Fix tests
This commit is contained in:
@@ -21,14 +21,4 @@ export default mergeConfig(baseConfig, {
|
|||||||
formats: ["es"],
|
formats: ["es"],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
test: {
|
|
||||||
include: ["tests/**/*.test.ts"],
|
|
||||||
exclude: ["./e2e/**/*", "./node_modules/**/*"],
|
|
||||||
reporters: ["default"],
|
|
||||||
coverage: {
|
|
||||||
provider: "v8",
|
|
||||||
include: ["src/**/*.ts"],
|
|
||||||
reporter: [["lcov", { projectRoot: "../../" }], "text"],
|
|
||||||
},
|
|
||||||
},
|
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -0,0 +1,21 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2026 Element Creations 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";
|
||||||
|
|
||||||
|
export default defineConfig({
|
||||||
|
test: {
|
||||||
|
include: ["tests/**/*.test.ts"],
|
||||||
|
exclude: ["./e2e/**/*", "./node_modules/**/*"],
|
||||||
|
reporters: ["default"],
|
||||||
|
coverage: {
|
||||||
|
provider: "v8",
|
||||||
|
include: ["src/**/*.ts"],
|
||||||
|
reporter: [["lcov", { projectRoot: "../../" }], "text"],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
});
|
||||||
@@ -12,7 +12,6 @@ import { nodePolyfills } from "vite-plugin-node-polyfills";
|
|||||||
import svgr from "vite-plugin-svgr";
|
import svgr from "vite-plugin-svgr";
|
||||||
import { importCSSSheet } from "@arcmantle/vite-plugin-import-css-sheet";
|
import { importCSSSheet } from "@arcmantle/vite-plugin-import-css-sheet";
|
||||||
import { mergeConfig } from "vitest/config";
|
import { mergeConfig } from "vitest/config";
|
||||||
import { playwright } from "@vitest/browser-playwright";
|
|
||||||
import baseConfig from "@element-hq/element-web-module-api/vite.base.ts";
|
import baseConfig from "@element-hq/element-web-module-api/vite.base.ts";
|
||||||
|
|
||||||
const __dirname = dirname(fileURLToPath(import.meta.url));
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
||||||
@@ -25,6 +24,7 @@ export default mergeConfig(baseConfig, {
|
|||||||
fileName: "index",
|
fileName: "index",
|
||||||
formats: ["es"],
|
formats: ["es"],
|
||||||
},
|
},
|
||||||
|
minify: false,
|
||||||
},
|
},
|
||||||
plugins: [
|
plugins: [
|
||||||
importCSSSheet(),
|
importCSSSheet(),
|
||||||
@@ -34,21 +34,4 @@ export default mergeConfig(baseConfig, {
|
|||||||
include: ["events"],
|
include: ["events"],
|
||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
test: {
|
|
||||||
include: ["tests/**/*.test.{ts,tsx}"],
|
|
||||||
exclude: ["./e2e/**/*", "./node_modules/**/*"],
|
|
||||||
reporters: ["default"],
|
|
||||||
coverage: {
|
|
||||||
provider: "v8",
|
|
||||||
include: ["src/**/*.ts"],
|
|
||||||
reporter: [["lcov", { projectRoot: "../../" }], "text"],
|
|
||||||
},
|
|
||||||
browser: {
|
|
||||||
enabled: true,
|
|
||||||
headless: true,
|
|
||||||
provider: playwright({}),
|
|
||||||
instances: [{ browser: "chromium" }],
|
|
||||||
},
|
|
||||||
setupFiles: ["tests/setupTests.ts"],
|
|
||||||
},
|
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -0,0 +1,29 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2026 Element Creations 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";
|
||||||
|
import { playwright } from "@vitest/browser-playwright";
|
||||||
|
|
||||||
|
export default defineConfig({
|
||||||
|
test: {
|
||||||
|
include: ["tests/**/*.test.{ts,tsx}"],
|
||||||
|
exclude: ["./e2e/**/*", "./node_modules/**/*"],
|
||||||
|
reporters: ["default"],
|
||||||
|
coverage: {
|
||||||
|
provider: "v8",
|
||||||
|
include: ["src/**/*.ts"],
|
||||||
|
reporter: [["lcov", { projectRoot: "../../" }], "text"],
|
||||||
|
},
|
||||||
|
browser: {
|
||||||
|
enabled: true,
|
||||||
|
headless: true,
|
||||||
|
provider: playwright({}),
|
||||||
|
instances: [{ browser: "chromium" }],
|
||||||
|
},
|
||||||
|
setupFiles: ["tests/setupTests.ts"],
|
||||||
|
},
|
||||||
|
});
|
||||||
Reference in New Issue
Block a user