Task Summary
frontend/src/app/workspace/component/code-editor-dialog/code-editor.component.ts is the largest uncovered file in the repo at 47.4%, 114 missed lines. But that number is wrong in a way that matters, and establishing the true baseline has to come first.
angular.json defines two test targets: gui:test (jsdom, which explicitly excludes **/*.browser.spec.ts) and gui:test-browser (Playwright/Chromium, which includes only those). build.yml:164 runs the browser target with no --coverage, and the Codecov upload at lines 140-145 takes only the jsdom lcov. So the browser suite's coverage has never reached Codecov.
Measuring both targets and taking the per-line union gives the honest split for the 247 instrumented lines:
| suite |
covered |
missed |
% |
| jsdom only (what Codecov sees) |
114 |
133 |
46.2% |
| browser only |
156 |
91 |
63.2% |
| true union |
197 |
50 |
79.8% |
83 lines are already exercised and merely unreported; only 50 are genuinely untested. Any plan that targets the first group duplicates existing work and moves the number by nothing.
Two things to know before starting:
ng run gui:test-browser --coverage fails out of the box — TypeError: Failed to fetch dynamically imported module: /@id/@vitest/coverage-v8/browser, because Vite does not pre-bundle the coverage provider's browser entry. The fix is one line in vitest.browser.config.ts: optimizeDeps.include: ["buffer", "@vitest/coverage-v8/browser"]. Enabling the browser-coverage upload without it produces nothing.
- New tests belong in the jsdom spec where possible, because that is the only suite Codecov currently reads — browser-spec work scores zero today.
Also worth knowing: about 10 lines sit behind ensureVscodeApiStarted(), a process-wide singleton both suites stub. Reaching them means booting the real codingame stack, which the browser spec's own header explicitly declines to do.
Task Type
Task Summary
frontend/src/app/workspace/component/code-editor-dialog/code-editor.component.tsis the largest uncovered file in the repo at 47.4%, 114 missed lines. But that number is wrong in a way that matters, and establishing the true baseline has to come first.angular.jsondefines two test targets:gui:test(jsdom, which explicitlyexcludes**/*.browser.spec.ts) andgui:test-browser(Playwright/Chromium, which includes only those).build.yml:164runs the browser target with no--coverage, and the Codecov upload at lines 140-145 takes only the jsdom lcov. So the browser suite's coverage has never reached Codecov.Measuring both targets and taking the per-line union gives the honest split for the 247 instrumented lines:
83 lines are already exercised and merely unreported; only 50 are genuinely untested. Any plan that targets the first group duplicates existing work and moves the number by nothing.
Two things to know before starting:
ng run gui:test-browser --coveragefails out of the box —TypeError: Failed to fetch dynamically imported module: /@id/@vitest/coverage-v8/browser, because Vite does not pre-bundle the coverage provider's browser entry. The fix is one line invitest.browser.config.ts:optimizeDeps.include: ["buffer", "@vitest/coverage-v8/browser"]. Enabling the browser-coverage upload without it produces nothing.Also worth knowing: about 10 lines sit behind
ensureVscodeApiStarted(), a process-wide singleton both suites stub. Reaching them means booting the real codingame stack, which the browser spec's own header explicitly declines to do.Task Type