[web] Experiment with code coverage (#28029)

* Update test script to allow coverage to be recorded

* Collect coverage in CI

* [web] integrate coverage report with Jenkins

* [web] add coverage report for acceptance tests

* Use --all flag in vitest coverage

* Use --all flag in acceptance tests

* Switch vitest to use istanbul

* Bump versions of vitest plugins and update package-lock.json

* [web] use a dedicated parameter for coverage in unit/acceptance tests

* [web] temporarily generate HTML report and archive artifacts

* [web] do not run acceptance tests as root in CI

* [web] increase hook timeout in vitest when collecting coverage

* [web] exclude packageMapping from coverage report

* [web] use relative paths in clover reports

* [web] reduce concurrency for unit tests in CI

* [web] keep source code forever on builds

* Revert "[web] temporarily generate HTML report and archive artifacts"

This reverts commit 4c9db571

* [web] archive all the raw coverage report files

* [monorepo] update build scripts for web

* [monorepo] update package-lock.json after merge

* [web] remove spurious change

* [web] merge Jenkins parameter sections

* [web] increase hookTimeout when collecting coverage report

---------

Co-authored-by: Jakob Ackermann <jakob.ackermann@overleaf.com>
GitOrigin-RevId: 9f1ec6d38a7b037267737bec3b0bc53a0ac844af
This commit is contained in:
Andrew Rumble
2026-02-09 13:51:13 +00:00
committed by Copybot
parent 9e41d9afdb
commit b2d4687c52
10 changed files with 917 additions and 147 deletions

View File

@@ -7,7 +7,7 @@
"public": "./public"
},
"scripts": {
"test:acceptance:run_dir": "mocha --recursive --timeout 25000 --grep=$MOCHA_GREP --require test/acceptance/bootstrap.js",
"test:acceptance:run_dir": "bin/test_acceptance_run_dir",
"test:acceptance:app": "npm run test:acceptance:run_dir -- test/acceptance/src",
"test:unit:run_dir": "bin/test_unit_run_dir",
"test:unit:all": "npm run test:unit:run_dir -- test/unit/src modules/*/test/unit/src",
@@ -273,7 +273,8 @@
"@uppy/react": "^3.2.1",
"@uppy/utils": "^5.7.0",
"@uppy/xhr-upload": "^3.6.0",
"@vitest/eslint-plugin": "1.1.44",
"@vitest/coverage-istanbul": "^4.0.17",
"@vitest/eslint-plugin": "1.6.6",
"@writefull/core": "^1.27.27",
"@writefull/ui": "^1.27.27",
"@writefull/utils": "^1.27.27",