chore: add vitest project config and yarn constraints

This commit is contained in:
Christian Andolf
2025-06-30 11:29:09 +02:00
parent 4e1cb01b84
commit 733281240f
14 changed files with 45 additions and 590 deletions

View File

@@ -34,6 +34,6 @@
"eslint-plugin-import": "^2.31.0",
"eslint-plugin-simple-import-sort": "^12.1.1",
"typescript": "5.8.3",
"vitest": "^3.2.3"
"vitest": "^3.2.4"
}
}

View File

@@ -1,7 +1,9 @@
export default {
import { defineConfig } from "vitest/config"
export default defineConfig({
test: {
globals: true,
environment: "jsdom",
setupFiles: ["./vitest-setup.ts"],
},
}
})

View File

@@ -1,4 +1,4 @@
import { describe, expect, it, vi } from "vitest"
import { beforeEach, describe, expect, it, vi } from "vitest"
vi.mock("./getPrefix", () => ({
getPrefix: vi.fn(() => "gitsha"),

View File

@@ -52,7 +52,7 @@
"eslint-plugin-import": "^2.31.0",
"eslint-plugin-simple-import-sort": "^12.1.1",
"typescript": "5.8.3",
"vitest": "^3.2.3"
"vitest": "^3.2.4"
},
"prettier": {
"semi": false,

View File

@@ -1,4 +1,4 @@
import { describe, expect } from "vitest"
import { describe, expect, it } from "vitest"
import { chunk } from "./chunk"

View File

@@ -180,6 +180,6 @@
"vite": "^6.3.5",
"vite-plugin-dts": "^4.5.3",
"vite-plugin-lib-inject-css": "^2.2.2",
"vitest": "^3.1.3"
"vitest": "^3.2.4"
}
}

View File

@@ -80,6 +80,6 @@
"eslint-plugin-import": "^2.31.0",
"eslint-plugin-simple-import-sort": "^12.1.1",
"typescript": "5.8.3",
"vitest": "^3.2.3"
"vitest": "^3.2.4"
}
}