mirror of
https://github.com/vector-im/element-call.git
synced 2024-11-21 00:28:08 +08:00
5eaabcf74d
* Fix coverage reporting Codecov hasn't been working recently because Vitest doesn't report coverage by default. * Suppress some noisy log lines Closes https://github.com/element-hq/element-call/issues/686 * Store test files alongside source files This way we benefit from not having to maintain the same directory structure twice, and our linters etc. will actually lint test files by default. * Stop using Vitest globals Vitest provides globals primarily to make the transition from Jest more smooth. But importing its functions explicitly is considered a better pattern, and we have so few tests right now that it's trivial to migrate them all. * Remove Storybook directory We no longer use Storybook. * Configure Codecov Add a coverage gate for all new changes and disable its comments. * upgrade vitest --------- Co-authored-by: Timo <toger5@hotmail.de>
25 lines
545 B
JavaScript
25 lines
545 B
JavaScript
import { defineConfig, mergeConfig } from "vitest/config";
|
|
import viteConfig from "./vite.config";
|
|
|
|
export default defineConfig((configEnv) =>
|
|
mergeConfig(
|
|
viteConfig(configEnv),
|
|
defineConfig({
|
|
test: {
|
|
environment: "jsdom",
|
|
css: {
|
|
modules: {
|
|
classNameStrategy: "non-scoped",
|
|
},
|
|
},
|
|
isolate: false,
|
|
setupFiles: ["src/vitest.setup.ts"],
|
|
coverage: {
|
|
reporter: ["html", "json"],
|
|
include: ["src/"],
|
|
},
|
|
},
|
|
}),
|
|
),
|
|
);
|