mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
build: upgrade vite to 5.4.x, vitest to 2.x and related vite packages (#8459)
* build: upgrade vite to 5.x, vitest to 2.x and related vite packages * upgrade vitest-ui and coverage * pass empty set to fix type error and update snap * set ignoreEmptyLines to false * update threshold * update coverage threshold * downgrade vite-plugin-pwa as its better to push separately with testing * add package resolutions for strip-ansi, string-width and wrap-ansi * disable pwa * only add resolution for strip-ansi
This commit is contained in:
parent
21fff26d31
commit
51ea184938
6 changed files with 893 additions and 388 deletions
|
@ -2,19 +2,27 @@ import { defineConfig } from "vitest/config";
|
|||
import { woff2BrowserPlugin } from "./scripts/woff2/woff2-vite-plugins";
|
||||
|
||||
export default defineConfig({
|
||||
// @ts-ignore
|
||||
//@ts-ignore
|
||||
plugins: [woff2BrowserPlugin()],
|
||||
test: {
|
||||
// Since hooks are running in stack in v2, which means all hooks run serially whereas
|
||||
// we need to run them in parallel
|
||||
sequence: {
|
||||
hooks: 'parallel',
|
||||
},
|
||||
setupFiles: ["./setupTests.ts"],
|
||||
globals: true,
|
||||
environment: "jsdom",
|
||||
coverage: {
|
||||
reporter: ["text", "json-summary", "json", "html", "lcovonly"],
|
||||
// Since v2, it ignores empty lines by default and we need to disable it as it affects the coverage
|
||||
// Additionally the thresholds also needs to be updated slightly as a result of this change
|
||||
ignoreEmptyLines: false,
|
||||
thresholds: {
|
||||
lines: 70,
|
||||
lines: 66,
|
||||
branches: 70,
|
||||
functions: 68,
|
||||
statements: 70,
|
||||
functions: 63,
|
||||
statements: 66,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue