diff --git a/ts-core/src/tests/caching/caching.test.ts b/ts-core/src/tests/caching/caching.test.ts index 08e72248..f36a11e3 100644 --- a/ts-core/src/tests/caching/caching.test.ts +++ b/ts-core/src/tests/caching/caching.test.ts @@ -15,11 +15,11 @@ describe("Caching", () => { const productId = Math.random().toString(); - const result1 = await client.getProductLongCache(productId, { + const result1 = await client.getProductLongCache(productId, "foo", { $cacheKey: productId, }); - const result2 = await client.getProductLongCache(productId, { + const result2 = await client.getProductLongCache(productId, "bar", { $cacheKey: productId, }); @@ -31,13 +31,13 @@ describe("Caching", () => { const productId = Math.random().toString(); - const result1 = await client.getProductShortCache(productId, { + const result1 = await client.getProductShortCache(productId, "foo", { $cacheKey: productId, }); await new Promise((resolve) => setTimeout(resolve, 1000)); // wait for cache to expire - const result2 = await client.getProductShortCache(productId, { + const result2 = await client.getProductShortCache(productId, "bar", { $cacheKey: productId, }); diff --git a/ts-core/src/tests/caching/product.ts b/ts-core/src/tests/caching/product.ts index e7431755..f06d03b1 100644 --- a/ts-core/src/tests/caching/product.ts +++ b/ts-core/src/tests/caching/product.ts @@ -1,11 +1,11 @@ import { cached } from "../../functions"; import { d } from "./d"; -export const getProduct = async (id: string) => { +export const getProduct = async (id: string, random: string) => { return { id, name: `Product ${id}`, - retrievedAt: Date.now(), + random, }; };