chore: tests config

This commit is contained in:
max 2022-08-01 23:22:44 +03:00
parent 7131a570f4
commit 6a3ef0f790
5 changed files with 5 additions and 6 deletions

View file

@ -8,7 +8,7 @@
"dev": "vite",
"build": "tsc && vite build",
"preview": "vite preview",
"test": "vitest --reporter verbose",
"test": "vitest",
"coverage": "vitest run --coverage"
},
"devDependencies": {

View file

@ -1,5 +1,3 @@
import {vi, describe, it, expect} from "vitest";
vi.stubGlobal("Names", {
getBase: () => 0,
getBaseShort: () => "TestName"

View file

@ -1,5 +1,3 @@
import {describe, it, expect} from "vitest";
import {sliceFragment} from "./arrayUtils";
describe("sliceFragment", () => {

View file

@ -15,6 +15,7 @@
"noUnusedParameters": true,
"noImplicitReturns": true,
"skipLibCheck": true,
"types": ["vitest/globals"],
"baseUrl": "src"
},
"include": ["src"]

View file

@ -64,7 +64,9 @@ export default defineConfig(({mode}) => {
}
},
test: {
environment: "happy-dom"
globals: true,
environment: "happy-dom",
reporters: ["verbose"]
},
resolve: {
alias: [