Skip to content

Commit 738fd08

Browse files
fix(infra): task cache cleanup test provides its service directly (pingdotgg#25164)
Co-authored-by: Claude Opus 5.5 <[email protected]>
1 parent 03df289 commit 738fd08

1 file changed

Lines changed: 4 additions & 7 deletions

File tree

‎infra/task-cache/src/Cleanup.test.ts‎

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
import * as NodeFS from "node:fs";
33
import * as NodeSqlite from "node:sqlite";
44
import * as Effect from "effect/Effect";
5-
import * as Layer from "effect/Layer";
65
import { expect, it } from "@effect/vitest";
76
import { cleanup } from "../vendor/vite-plus-remote-cache-cloudflare/src/database.ts";
87
import * as Cache from "./Cache.ts";
@@ -89,12 +88,10 @@ it.effect("cleans three full disjoint batches within the D1 invocation budget",
8988
},
9089
} as unknown as Parameters<typeof cleanup>[0];
9190
yield* Cleanup.run().pipe(
92-
Effect.provide(
93-
Layer.succeed(Cache.Cache, {
94-
handle: () => Effect.die("unused"),
95-
cleanup: Effect.promise(() => cleanup(env)),
96-
}),
97-
),
91+
Effect.provideService(Cache.Cache, {
92+
handle: () => Effect.die("unused"),
93+
cleanup: Effect.promise(() => cleanup(env)),
94+
}),
9895
);
9996
expect(claims.map((claim) => claim.length)).toEqual([256, 256, 256]);
10097
expect(new Set(claims.flat()).size).toBe(768);

0 commit comments

Comments
 (0)