mirror of
https://github.com/sudosylabs/vnidrop.git
synced 2026-08-05 10:29:58 +02:00
feat(diagnostics): harden ingestion and delivery
This commit is contained in:
23
services/diagnostics-api/vitest.config.ts
Normal file
23
services/diagnostics-api/vitest.config.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
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"],
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user