forked from nkzw-tech/codiff
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvitest.cloudflare.config.ts
More file actions
32 lines (31 loc) · 1.01 KB
/
Copy pathvitest.cloudflare.config.ts
File metadata and controls
32 lines (31 loc) · 1.01 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
import { fileURLToPath } from 'node:url';
import { cloudflareTest, readD1Migrations } from '@cloudflare/vitest-pool-workers';
import { defineConfig } from 'vite-plus';
export default defineConfig({
plugins: [
cloudflareTest(async () => ({
main: './web/dist/ssr/index.js',
miniflare: {
bindings: {
AUTH_GITHUB_CLIENT_ID: 'test-github-client-id',
AUTH_GITHUB_CLIENT_SECRET: 'test-github-client-secret',
BETTER_AUTH_SECRET: 'test-better-auth-secret-at-least-32-characters',
PUBLIC_ORIGIN: 'https://test.codiff.local',
TEST_MIGRATIONS: await readD1Migrations(
fileURLToPath(new URL('./web/db/migrations', import.meta.url)),
),
},
d1Databases: ['DB'],
r2Buckets: ['WALKTHROUGH_BUCKET'],
},
remoteBindings: false,
wrangler: {
configPath: './web/wrangler.jsonc',
},
})),
],
test: {
include: ['test/**/*.integration.ts'],
setupFiles: ['./test/setup.cloudflare.ts'],
},
});