Open History to see the last commit
1// Minimal typing for the `cloudflare:test` module provided at runtime by
2// @cloudflare/vitest-pool-workers. Binding types come from the generated
3// worker-configuration.d.ts globals (wrangler types).
4declare module 'cloudflare:test' {
5 import type { D1Migration } from '@cloudflare/vitest-pool-workers'
6
7 interface ProvidedEnv {
8 SCHEMA_CACHE: KVNamespace
9 DB: D1Database
10 TEST_MIGRATIONS: Array<D1Migration>
11 }
12
13 export const env: ProvidedEnv
14
15 export function applyD1Migrations(
16 db: D1Database,
17 migrations: Array<D1Migration>,
18 migrationsTableName?: string,
19 ): Promise<void>
20}