-
Notifications
You must be signed in to change notification settings - Fork 30
Expand file tree
/
Copy pathvitest.config.ts
More file actions
40 lines (39 loc) · 1.1 KB
/
Copy pathvitest.config.ts
File metadata and controls
40 lines (39 loc) · 1.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
import { defineConfig } from "vitest/config";
import { cloudflareTest } from "@cloudflare/vitest-pool-workers";
export default defineConfig({
plugins: [
cloudflareTest({
wrangler: { configPath: "./test/fixtures/pds-worker/wrangler.jsonc" },
miniflare: {
bindings: {
DID: "did:web:pds.test",
HANDLE: "alice.test",
PDS_HOSTNAME: "pds.test",
AUTH_TOKEN: "test-token",
SIGNING_KEY:
"e5b452e70de7fb7864fdd7f0d67c6dbd0f128413a1daa1b2b8a871e906fc90cc",
SIGNING_KEY_PUBLIC:
"zQ3shbUq6umkAhwsxEXj6fRZ3ptBtF5CNZbAGoKjvFRatUkVY",
JWT_SECRET: "test-jwt-secret-at-least-32-chars-long",
PASSWORD_HASH:
"$2b$10$B6MKXNJ33Co3RoIVYAAvvO3jImuMiqL1T1YnFDN7E.hTZLtbB4SW6",
// Start accounts active by default in tests
INITIAL_ACTIVE: "true",
},
},
}),
],
resolve: {
conditions: ["worker", "browser", "node", "require"],
alias: {
pino: "pino/browser.js",
},
},
test: {
globals: true,
// Vitest 4: singleWorker is now maxWorkers: 1, isolate: false
maxWorkers: 1,
isolate: false,
exclude: ["test/cli/**", "node_modules/**"],
},
});