env.test-d.ts
This file
Path
apps/platform/test/env.test-d.ts
15 lines · 548 bytes · TypeScript
Last changed by
Merge build/comments-platform into mainoscabrielbefore adoptionddf09e8
History of this fileTake it
12345678910111213141516import { describe, expectTypeOf, it } from "vitest";
describe("the platform Worker's Env", () => { it("holds the public namespace and the private one", () => { expectTypeOf<Env>().toHaveProperty("ARTIFACTS"); expectTypeOf<Env>().toHaveProperty("ARTIFACTS_PRIVATE"); expectTypeOf<Env["ARTIFACTS_PRIVATE"]>().toEqualTypeOf<Env["ARTIFACTS"]>(); });
it("holds no other Artifacts binding", () => { expectTypeOf<Extract<keyof Env, `ARTIFACTS${string}`>>().toEqualTypeOf< "ARTIFACTS" | "ARTIFACTS_PRIVATE" >(); });});