Skip to content

Commit

Permalink
Assert return value for incremental cache redirect
Browse files Browse the repository at this point in the history
  • Loading branch information
socsieng committed Nov 1, 2024
1 parent f0a173c commit dccf33f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion packages/tests-unit/tests/adapters/cache.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -362,9 +362,15 @@ describe("S3Cache", () => {
lastModified: Date.now(),
});

await cache.get("key", { kindHint: "app" });
const result = await cache.get("key", { kindHint: "app" });

expect(getIncrementalCache).toHaveBeenCalled();
expect(result).toEqual({
value: {
kind: "REDIRECT",
},
lastModified: Date.now(),
});
});

it("Should return null when incremental cache fails", async () => {
Expand Down

0 comments on commit dccf33f

Please sign in to comment.