forked from scalableminds/webknossos
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvitest.config.ts
More file actions
33 lines (31 loc) · 1.08 KB
/
vitest.config.ts
File metadata and controls
33 lines (31 loc) · 1.08 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
import { defineConfig, mergeConfig } from "vitest/config";
import viteConfig from "./vite.config";
// This config object is intentionally left under-specified (see config.test.include).
// Other vitest_*.config.ts import this config. Vitest should always be called with
// the --config property (see scripts package.json). This avoids that e2e tests are
// accidentally executed (e.g., if the user executes `yarn vitest`) which would drop
// the current database content.
export const config = mergeConfig(viteConfig, {
test: {
globals: true,
setupFiles: ["./frontend/javascripts/test/global_mocks.ts"],
include: [
"If you see this, you should use another yarn test-* script or call vitest with the --config option",
],
exclude: [],
env: { IS_TESTING: "true" },
testTimeout: 10000,
coverage: {
reporter: ["text", "json-summary", "json"],
reportOnFailure: true,
},
},
resolve: {
...viteConfig.resolve,
alias: {
...viteConfig.resolve?.alias,
"lz4-wasm": "lz4-wasm-nodejs",
},
},
});
export default defineConfig(config);