v3: coverage tasks for both suites — deno task test:coverage runs the Deno tests of api/ and shared/ with coverage and writes the report to coverage/api, deno task test:web:coverage runs the Vitest suite with @vitest/coverage-v8 (at vitest's own 5.0.2) into coverage/web. Each prints a table and leaves an HTML report and an lcov.info. They write to separate folders because deno test --clean empties its whole output directory, which would take the frontend report with it. The frontend report counts src/ without src/test/ and the generated src/locales/; the backend report still lists api/test/helpers.ts and setup.ts, since deno.json has no coverage exclude and a separate deno coverage --exclude pass merged the raw profiles into different figures. No behaviour changes.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -9,7 +9,9 @@
|
||||
"i18n:compile": "deno run -A npm:@lingui/cli compile --workers 1",
|
||||
"start": "deno task icons dist && deno run --env-file -A api/db/init.ts && deno run --env-file -A api/main.ts",
|
||||
"test": "deno test -A api/ shared/",
|
||||
"test:web": "deno run -A npm:vitest run"
|
||||
"test:coverage": "deno test -A --coverage=coverage/api --clean api/ shared/",
|
||||
"test:web": "deno run -A npm:vitest run",
|
||||
"test:web:coverage": "deno run -A npm:vitest run --coverage"
|
||||
},
|
||||
"nodeModulesDir": "auto",
|
||||
"compilerOptions": {
|
||||
|
||||
64
deno.lock
generated
64
deno.lock
generated
@@ -46,13 +46,14 @@
|
||||
"npm:@resvg/resvg-wasm@2.6.2": "2.6.2",
|
||||
"npm:@resvg/resvg-wasm@^2.6.2": "2.6.2",
|
||||
"npm:@testing-library/dom@^10.4.2": "10.4.2",
|
||||
"npm:@testing-library/jest-dom@^7.0.1": "7.0.1_@testing-library+dom@10.4.2_vitest@5.0.2__@types+node@26.6.3__jsdom@30.1.1__vite@8.3.1___@types+node@26.6.3___jiti@2.7.0__jiti@2.7.0_@types+node@26.6.3_jiti@2.7.0_vite@8.3.1__@types+node@26.6.3__jiti@2.7.0",
|
||||
"npm:@testing-library/jest-dom@^7.0.1": "7.0.1_@testing-library+dom@10.4.2_vitest@5.0.2__@types+node@26.6.3__@vitest+coverage-v8@5.0.2__jsdom@30.1.1__vite@8.3.1___@types+node@26.6.3___jiti@2.7.0_@vitest+coverage-v8@5.0.2__vitest@5.0.2__@types+node@26.6.3__jsdom@30.1.1__vite@8.3.1___@types+node@26.6.3___jiti@2.7.0",
|
||||
"npm:@testing-library/react@^16.3.3": "16.3.3_@testing-library+dom@10.4.2_@types+react@19.3.0_@types+react-dom@19.3.0__@types+react@19.3.0_react@19.3.0_react-dom@19.3.0__react@19.3.0",
|
||||
"npm:@testing-library/user-event@^14.6.7": "14.6.7_@testing-library+dom@10.4.2",
|
||||
"npm:@types/node@^26.6.3": "26.6.3",
|
||||
"npm:@types/react-dom@^19.3.0": "19.3.0_@types+react@19.3.0",
|
||||
"npm:@types/react@^19.3.0": "19.3.0",
|
||||
"npm:@vitejs/plugin-react-swc@^4.3.3": "4.3.3_vite@8.3.1__@types+node@26.6.3__jiti@2.7.0_@types+node@26.6.3_jiti@2.7.0",
|
||||
"npm:@vitest/coverage-v8@^5.0.2": "5.0.2_vitest@5.0.2_@types+node@26.6.3_jsdom@30.1.1_vite@8.3.1__@types+node@26.6.3__jiti@2.7.0",
|
||||
"npm:emojibase-data@17.0.0": "17.0.0_emojibase@17.0.0",
|
||||
"npm:eslint-plugin-react-hooks@^7.1.1": "7.1.1_eslint@10.11.0__jiti@2.7.0_jiti@2.7.0",
|
||||
"npm:eslint-plugin-react-refresh@~0.5.7": "0.5.7_eslint@10.11.0__jiti@2.7.0_jiti@2.7.0",
|
||||
@@ -74,8 +75,8 @@
|
||||
"npm:typescript@~6.0.3": "6.0.3",
|
||||
"npm:vite@*": "8.3.1_@types+node@26.6.3_jiti@2.7.0",
|
||||
"npm:vite@^8.3.1": "8.3.1_@types+node@26.6.3_jiti@2.7.0",
|
||||
"npm:vitest@*": "5.0.2_@types+node@26.6.3_jsdom@30.1.1_vite@8.3.1__@types+node@26.6.3__jiti@2.7.0_jiti@2.7.0",
|
||||
"npm:vitest@^5.0.2": "5.0.2_@types+node@26.6.3_jsdom@30.1.1_vite@8.3.1__@types+node@26.6.3__jiti@2.7.0_jiti@2.7.0"
|
||||
"npm:vitest@*": "5.0.2_@types+node@26.6.3_@vitest+coverage-v8@5.0.2_jsdom@30.1.1_vite@8.3.1__@types+node@26.6.3__jiti@2.7.0",
|
||||
"npm:vitest@^5.0.2": "5.0.2_@types+node@26.6.3_@vitest+coverage-v8@5.0.2_jsdom@30.1.1_vite@8.3.1__@types+node@26.6.3__jiti@2.7.0"
|
||||
},
|
||||
"jsr": {
|
||||
"@db/sqlite@0.13.0": {
|
||||
@@ -230,7 +231,7 @@
|
||||
"integrity": "sha512-Aup7aUOfpbAUg2ROOJN6Iw5f9DMBlzu0mIkm/malLQFN/YQgO48wCj0Kxa3sEHJvPVFg7siR+qRInwXd2qhQKw==",
|
||||
"dependencies": [
|
||||
"@babel/helper-validator-identifier",
|
||||
"js-tokens",
|
||||
"js-tokens@4.0.0",
|
||||
"picocolors"
|
||||
]
|
||||
},
|
||||
@@ -349,6 +350,9 @@
|
||||
"@babel/helper-validator-identifier"
|
||||
]
|
||||
},
|
||||
"@bcoe/v8-coverage@1.0.2": {
|
||||
"integrity": "sha512-6zABk/ECA/QYSCQ1NGiVwwbQerUCZ+TQbp64Q3AgmfNvurHH0j8TtXa1qbShXA6qqkpAj4V5W8pP6mLe1mcMqA=="
|
||||
},
|
||||
"@bramus/specificity@2.4.2": {
|
||||
"integrity": "sha512-ctxtJ/eA+t+6q2++vj5j7FYX3nRu311q1wfYH3xjlLOsczhlhxAg2FWNUXhpGvAw3BWo1xBcvOV6/YLc2r5FJw==",
|
||||
"dependencies": [
|
||||
@@ -865,7 +869,7 @@
|
||||
"pretty-format@27.5.1"
|
||||
]
|
||||
},
|
||||
"@testing-library/jest-dom@7.0.1_@testing-library+dom@10.4.2_vitest@5.0.2__@types+node@26.6.3__jsdom@30.1.1__vite@8.3.1___@types+node@26.6.3___jiti@2.7.0__jiti@2.7.0_@types+node@26.6.3_jiti@2.7.0_vite@8.3.1__@types+node@26.6.3__jiti@2.7.0": {
|
||||
"@testing-library/jest-dom@7.0.1_@testing-library+dom@10.4.2_vitest@5.0.2__@types+node@26.6.3__@vitest+coverage-v8@5.0.2__jsdom@30.1.1__vite@8.3.1___@types+node@26.6.3___jiti@2.7.0_@vitest+coverage-v8@5.0.2__vitest@5.0.2__@types+node@26.6.3__jsdom@30.1.1__vite@8.3.1___@types+node@26.6.3___jiti@2.7.0": {
|
||||
"integrity": "sha512-oMDTC3oA+6CXSO2JZnvOI7CA6oVub6kij5ggk9ohwye5slmkwxYDXcPOVxgMw/RQlticjtO0C1RZkR97HgrWMw==",
|
||||
"dependencies": [
|
||||
"@adobe/css-tools",
|
||||
@@ -1109,6 +1113,29 @@
|
||||
"vite"
|
||||
]
|
||||
},
|
||||
"@vitest/coverage-v8@5.0.2_vitest@5.0.2_@types+node@26.6.3_jsdom@30.1.1_vite@8.3.1__@types+node@26.6.3__jiti@2.7.0": {
|
||||
"integrity": "sha512-3ffHBEi8DOOBLwIGBhOBZbRfYFYWjMUuxZicONdhuFEFEG5AVsMOSrVeuROskqnqpbOmEJwxM2eTVZ9N3a1t+A==",
|
||||
"dependencies": [
|
||||
"@bcoe/v8-coverage",
|
||||
"@vitest/istanbul-lib-coverage",
|
||||
"@vitest/istanbul-lib-report",
|
||||
"ast-v8-to-istanbul",
|
||||
"magicast",
|
||||
"obug",
|
||||
"std-env",
|
||||
"tinyrainbow",
|
||||
"vitest"
|
||||
]
|
||||
},
|
||||
"@vitest/istanbul-lib-coverage@1.0.1": {
|
||||
"integrity": "sha512-k3DJZ8LhMBK9NS4SclF1ASD3OgXEWDorbIcPTRDK0/Zae6fRvu+fJRxtFdLfHsa9Y24beCdPnoNZ4LviTNstfA=="
|
||||
},
|
||||
"@vitest/istanbul-lib-report@1.0.1": {
|
||||
"integrity": "sha512-1EOLRfsTMnyAr3+kEAsP4o9dhaDlGPpD7H5iLBBeq//YpNB1VIahkPhB+eRp9N2Dkfw8oySROjE3yf9XDeaIkQ==",
|
||||
"dependencies": [
|
||||
"@vitest/istanbul-lib-coverage"
|
||||
]
|
||||
},
|
||||
"@vitest/mocker@5.0.2_vite@8.3.1__@types+node@26.6.3__jiti@2.7.0_@types+node@26.6.3_jiti@2.7.0": {
|
||||
"integrity": "sha512-Z5FS00Q1SJHkB35xATsmWGdQ5WA1/0MV3CDjqyv7GavHv1OfOj145MNfHOlHk7QLes21dKFDHr8EO2zvL+9WGA==",
|
||||
"dependencies": [
|
||||
@@ -1168,6 +1195,14 @@
|
||||
"assertion-error@2.0.1": {
|
||||
"integrity": "sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA=="
|
||||
},
|
||||
"ast-v8-to-istanbul@1.0.7": {
|
||||
"integrity": "sha512-kFL68AG6ajd8fg248zwM9GQrUWEp79gsmjum34OEXjs4yHuUMZfYKwOLW9GMmB4oNvVrj+EAGxsP7ye2UR9UlA==",
|
||||
"dependencies": [
|
||||
"@jridgewell/trace-mapping",
|
||||
"estree-walker",
|
||||
"js-tokens@10.0.0"
|
||||
]
|
||||
},
|
||||
"bail@2.0.2": {
|
||||
"integrity": "sha512-0xO6mYd7JB2YesxDKplafRpsiOzPt9V02ddPCLbY1xYGPOX24NTyN50qnUxgCPcSoYMhKpAuBTjQoRZCAkUDRw=="
|
||||
},
|
||||
@@ -1725,6 +1760,9 @@
|
||||
"js-sha256@0.10.1": {
|
||||
"integrity": "sha512-5obBtsz9301ULlsgggLg542s/jqtddfOpV5KJc4hajc9JV8GeY2gZHSVpYBn4nWqAUTJ9v+xwtbJ1mIBgIH5Vw=="
|
||||
},
|
||||
"js-tokens@10.0.0": {
|
||||
"integrity": "sha512-lM/UBzQmfJRo9ABXbPWemivdCW8V2G8FHaHdypQaIy523snUjog0W71ayWXTjiR+ixeMyVHN2XcpnTd/liPg/Q=="
|
||||
},
|
||||
"js-tokens@4.0.0": {
|
||||
"integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ=="
|
||||
},
|
||||
@@ -1895,6 +1933,14 @@
|
||||
"@jridgewell/sourcemap-codec"
|
||||
]
|
||||
},
|
||||
"magicast@0.5.5": {
|
||||
"integrity": "sha512-UicdXN8zQ3JHlxVq+28afMXPr1z7WNY6+7EJnzTdQWkTAlMLF5fNCCKxJHBQwGaNGR11581EiQmQzx73+MvszA==",
|
||||
"dependencies": [
|
||||
"@babel/parser",
|
||||
"@babel/types",
|
||||
"source-map-js"
|
||||
]
|
||||
},
|
||||
"markdown-table@3.0.4": {
|
||||
"integrity": "sha512-wiYz4+JrLyb/DqW2hkFJxP7Vd7JuTDm77fvbM8VfEQdmSMqcImWeeRbHwZjBjIFki/VaMK2BhFi7oUUZeM5bqw=="
|
||||
},
|
||||
@@ -2739,6 +2785,9 @@
|
||||
"tinypool@2.2.0": {
|
||||
"integrity": "sha512-jBrmx4lYmaC9k/mgPbylxs7kBUxHtD8256up+HjLaDFfXScKJQyil+SWXSvhAtT7XHo+yTVlpB81PGmHP8oLSQ=="
|
||||
},
|
||||
"tinyrainbow@3.1.1": {
|
||||
"integrity": "sha512-yau8yJdTt989Mm0Bd/236QnzEiPf2xLLTqUZRUJOo/3CB078LSwzei343DgtJVmfJKJE3TMINY1u42SQsP6mXw=="
|
||||
},
|
||||
"tldts-core@7.4.15": {
|
||||
"integrity": "sha512-ERuv0p98XgSzmlSLJr8vDNxX+uATGInlN97V3R+JpYWaSqn5IG3ewWgCwczk4bkOpgth/o8Nt5FOi4B4w0n/1A=="
|
||||
},
|
||||
@@ -2906,11 +2955,12 @@
|
||||
],
|
||||
"bin": true
|
||||
},
|
||||
"vitest@5.0.2_@types+node@26.6.3_jsdom@30.1.1_vite@8.3.1__@types+node@26.6.3__jiti@2.7.0_jiti@2.7.0": {
|
||||
"vitest@5.0.2_@types+node@26.6.3_@vitest+coverage-v8@5.0.2_jsdom@30.1.1_vite@8.3.1__@types+node@26.6.3__jiti@2.7.0": {
|
||||
"integrity": "sha512-7MQrx9pDv5aHiUcovIb/70Ys3tgtkUVgCtledvKdCmEO+/1Dicq5ZqoSxOW034m03oqC+oHOKui2dM6qtMLoJg==",
|
||||
"dependencies": [
|
||||
"@types/chai",
|
||||
"@types/node",
|
||||
"@vitest/coverage-v8",
|
||||
"@vitest/mocker",
|
||||
"chai",
|
||||
"es-module-lexer",
|
||||
@@ -2928,6 +2978,7 @@
|
||||
],
|
||||
"optionalPeers": [
|
||||
"@types/node",
|
||||
"@vitest/coverage-v8",
|
||||
"jsdom"
|
||||
],
|
||||
"bin": true
|
||||
@@ -3037,6 +3088,7 @@
|
||||
"npm:@types/react-dom@^19.3.0",
|
||||
"npm:@types/react@^19.3.0",
|
||||
"npm:@vitejs/plugin-react-swc@^4.3.3",
|
||||
"npm:@vitest/coverage-v8@^5.0.2",
|
||||
"npm:emojibase-data@17.0.0",
|
||||
"npm:eslint-plugin-react-hooks@^7.1.1",
|
||||
"npm:eslint-plugin-react-refresh@~0.5.7",
|
||||
|
||||
@@ -42,6 +42,7 @@
|
||||
"@testing-library/user-event": "^14.6.7",
|
||||
"@types/node": "^26.6.3",
|
||||
"@types/react-dom": "^19.3.0",
|
||||
"@vitest/coverage-v8": "^5.0.2",
|
||||
"eslint": "^10.11.0",
|
||||
"eslint-plugin-react-hooks": "^7.1.1",
|
||||
"eslint-plugin-react-refresh": "^0.5.7",
|
||||
|
||||
@@ -14,6 +14,13 @@ export default mergeConfig(
|
||||
restoreMocks: true,
|
||||
unstubGlobals: true,
|
||||
css: false,
|
||||
coverage: {
|
||||
provider: "v8",
|
||||
include: ["src/**/*.{ts,tsx}"],
|
||||
exclude: ["src/test/**", "src/locales/**"],
|
||||
reporter: ["text", "html", "lcov"],
|
||||
reportsDirectory: "coverage/web",
|
||||
},
|
||||
},
|
||||
}),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user