mirror of
https://github.com/misenhower/splatoon2.ink.git
synced 2026-09-29 04:37:00 -05:00
28 lines
882 B
JavaScript
28 lines
882 B
JavaScript
import { fileURLToPath } from 'node:url';
|
|
import { cloudflareTest } from '@cloudflare/vitest-plugin';
|
|
import { defineConfig } from 'vitest/config';
|
|
|
|
export default defineConfig({
|
|
plugins: [
|
|
cloudflareTest({
|
|
// Browser captures are mocked; automated tests never use the remote service.
|
|
remoteBindings: false,
|
|
miniflare: { bindings: { AUTOMATIC_SCHEDULING_ENABLED: 'true' } },
|
|
wrangler: {
|
|
environment: 'dev',
|
|
configPath: fileURLToPath(new URL('./wrangler.jsonc', import.meta.url)),
|
|
},
|
|
}),
|
|
],
|
|
test: {
|
|
include: ['workers/updater/**/*.spec.mjs'],
|
|
deps: {
|
|
optimizer: {
|
|
// ics -> yup -> property-expr is CommonJS; pre-bundle it so its named exports resolve
|
|
// in vitest's module runner the way they do in wrangler's bundle.
|
|
ssr: { enabled: true, include: ['ics'] },
|
|
},
|
|
},
|
|
},
|
|
});
|