mirror of
https://github.com/sudosylabs/vnidrop.git
synced 2026-08-05 18:39:55 +02:00
24 lines
647 B
TypeScript
24 lines
647 B
TypeScript
import { cloudflareTest, readD1Migrations } from "@cloudflare/vitest-pool-workers";
|
|
import { dirname, resolve } from "node:path";
|
|
import { fileURLToPath } from "node:url";
|
|
import { defineConfig } from "vitest/config";
|
|
|
|
const migrationsPath = resolve(dirname(fileURLToPath(import.meta.url)), "migrations");
|
|
|
|
export default defineConfig({
|
|
plugins: [
|
|
cloudflareTest(async () => ({
|
|
wrangler: { configPath: "./wrangler.jsonc" },
|
|
miniflare: {
|
|
bindings: {
|
|
INGEST_KEY: "test-ingest-key",
|
|
TEST_MIGRATIONS: await readD1Migrations(migrationsPath),
|
|
},
|
|
},
|
|
})),
|
|
],
|
|
test: {
|
|
setupFiles: ["./test/apply-migrations.ts"],
|
|
},
|
|
});
|