mirror of
https://github.com/Nezumi-2711/uptime-monitoring.git
synced 2026-09-22 13:48:31 +00:00
18 lines
585 B
TypeScript
18 lines
585 B
TypeScript
import { cloudflareTest, readD1Migrations } from '@cloudflare/vitest-plugin';
|
|
import { defineConfig } from 'vitest/config';
|
|
|
|
const migrations = await readD1Migrations('./migrations');
|
|
|
|
export default defineConfig({
|
|
plugins: [
|
|
cloudflareTest({
|
|
wrangler: { configPath: './wrangler.jsonc' },
|
|
miniflare: {
|
|
// STATUS_CACHE_SECONDS '0' disables the public-status edge cache so assertions see
|
|
// fresh D1 reads instead of a response cached by an earlier test.
|
|
bindings: { TEST_MIGRATIONS: migrations, STATUS_CACHE_SECONDS: '0', PUBLIC_BASE_URL: '' },
|
|
},
|
|
}),
|
|
],
|
|
});
|