mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2024-11-24 15:56:22 +00:00
1a5cbf8ecb
* set default test timeout to 20s * remove "TIMEOUT" reference from create-test-boilerplate * remove TIMEOUT from tests * test: remove leftover `20 sec timeout` references Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> --------- Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
44 lines
1.0 KiB
TypeScript
44 lines
1.0 KiB
TypeScript
import { defineProject } from "vitest/config";
|
|
import { defaultConfig } from "./vite.config";
|
|
|
|
export default defineProject(({ mode }) => ({
|
|
...defaultConfig,
|
|
test: {
|
|
testTimeout: 20000,
|
|
setupFiles: ["./src/test/fontFace.setup.ts", "./src/test/vitest.setup.ts"],
|
|
server: {
|
|
deps: {
|
|
inline: ["vitest-canvas-mock"],
|
|
//@ts-ignore
|
|
optimizer: {
|
|
web: {
|
|
include: ["vitest-canvas-mock"],
|
|
},
|
|
},
|
|
},
|
|
},
|
|
environment: "jsdom" as const,
|
|
environmentOptions: {
|
|
jsdom: {
|
|
resources: "usable",
|
|
},
|
|
},
|
|
threads: false,
|
|
trace: true,
|
|
restoreMocks: true,
|
|
watch: false,
|
|
coverage: {
|
|
provider: "istanbul" as const,
|
|
reportsDirectory: "coverage" as const,
|
|
reporters: ["text-summary", "html"],
|
|
},
|
|
name: "main",
|
|
include: ["./src/test/**/*.{test,spec}.ts"],
|
|
exclude: ["./src/test/pre.test.ts"],
|
|
},
|
|
esbuild: {
|
|
pure: mode === "production" ? ["console.log"] : [],
|
|
keepNames: true,
|
|
},
|
|
}));
|