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" />
33 lines
770 B
TypeScript
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",
|
|
],
|
|
},
|
|
},
|
|
],
|
|
},
|
|
});
|