2026-02-25 09:36:58 +00:00
|
|
|
/*
|
|
|
|
|
Copyright 2025 New Vector Ltd.
|
|
|
|
|
|
|
|
|
|
SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
|
|
|
|
|
Please see LICENSE files in the repository root for full details.
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
import { defineConfig } from "vitest/config";
|
2026-03-06 16:20:40 +00:00
|
|
|
import { env } from "node:process";
|
|
|
|
|
|
|
|
|
|
const isGHA = env["GITHUB_ACTIONS"] !== undefined;
|
2026-02-25 09:36:58 +00:00
|
|
|
|
|
|
|
|
export default defineConfig({
|
|
|
|
|
test: {
|
|
|
|
|
include: ["tests/**/*.test.ts"],
|
|
|
|
|
exclude: ["./e2e/**/*", "./node_modules/**/*"],
|
2026-03-06 16:20:40 +00:00
|
|
|
reporters: isGHA
|
|
|
|
|
? ["default", ["vitest-sonar-reporter", { outputFile: "coverage/sonar-report.xml" }]]
|
|
|
|
|
: ["default"],
|
|
|
|
|
coverage: {
|
|
|
|
|
provider: "v8",
|
|
|
|
|
include: ["src/**/*.ts"],
|
|
|
|
|
reporter: ["lcov", "text"],
|
|
|
|
|
},
|
2026-02-25 09:36:58 +00:00
|
|
|
},
|
|
|
|
|
});
|