Add vitest and configuration

GitOrigin-RevId: 1262f9f32a0db6a29d3feedd8158b8dd04e48b6a
This commit is contained in:
Andrew Rumble
2025-05-29 08:04:55 +00:00
committed by Copybot
parent ce67a27c97
commit 0d3025b8cf
10 changed files with 888 additions and 25 deletions
+5 -1
View File
@@ -9,10 +9,12 @@
"scripts": {
"test:acceptance:run_dir": "mocha --recursive --timeout 25000 --grep=$MOCHA_GREP --require test/acceptance/bootstrap.js",
"test:acceptance:app": "npm run test:acceptance:run_dir -- test/acceptance/src",
"test:unit:run_dir": "mocha --recursive --timeout 25000 --exit --grep=$MOCHA_GREP --require test/unit/bootstrap.js",
"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",
"test:unit:all:silent": "npm run test:unit:all -- --reporter dot",
"test:unit:app": "npm run test:unit:run_dir -- test/unit/src",
"test:unit:esm": "vitest run",
"test:unit:esm:watch": "vitest",
"test:frontend": "NODE_ENV=test TZ=GMT mocha --recursive --timeout 5000 --exit --extension js,jsx,mjs,ts,tsx --grep=$MOCHA_GREP --require test/frontend/bootstrap.js --ignore '**/*.spec.{js,jsx,ts,tsx}' --ignore '**/helpers/**/*.{js,jsx,ts,tsx}' test/frontend modules/*/test/frontend",
"test:frontend:coverage": "c8 --all --include 'frontend/js' --include 'modules/*/frontend/js' --exclude 'frontend/js/vendor' --reporter=lcov --reporter=text-summary npm run test:frontend",
"start": "node app.mjs",
@@ -250,6 +252,7 @@
"@uppy/react": "^3.2.1",
"@uppy/utils": "^5.7.0",
"@uppy/xhr-upload": "^3.6.0",
"@vitest/eslint-plugin": "1.1.44",
"5to6-codemod": "^1.8.0",
"abort-controller": "^3.0.0",
"acorn": "^7.1.1",
@@ -356,6 +359,7 @@
"tty-browserify": "^0.0.1",
"typescript": "^5.0.4",
"uuid": "^9.0.1",
"vitest": "^3.1.2",
"w3c-keyname": "^2.2.8",
"webpack": "^5.98.0",
"webpack-assets-manifest": "^5.2.1",