Files
github-stats-extended/apps/backend/vitest.config.ts
T
Marco Pasqualetti 238ca1c97f test(backend): migrate to vitest (#95)
Use `vitest` for backend tests:

- `bench` script now uses [vitest's
`bench`](https://vitest.dev/api/#bench)
- e2e test fails with same error happening now with jest:`data-testid`
attribute not present.
  vitest left, jest right
<img width="1264" height="603" alt="image"
src="https://github.com/user-attachments/assets/56fc43a6-e143-4208-bf14-7e016aae7fa9"
/>
2026-02-22 16:02:46 +01:00

33 lines
770 B
TypeScript

import { defineConfig } from "vitest/config";
export default defineConfig({
test: {
coverage: {
enabled: true,
},
projects: [
{
test: {
name: "backend/public-instance",
environment: "jsdom",
dir: "tests",
include: ["./*.test.{ts,js}", "./public-instance/*.test.{ts,js}"],
setupFiles: ["./tests/_setup.js"],
},
},
{
test: {
name: "backend/private-instance",
environment: "jsdom",
dir: "tests",
include: ["./*.test.{ts,js}", "./private-instance/*.test.{ts,js}"],
setupFiles: [
"./tests/_setup.js",
"./tests/_setup.private-instance.js",
],
},
},
],
},
});