test: consolidate unit tests (#9588)

All mocha tests have been migrated to Jest tests.

Closes #9564
This commit is contained in:
Vladimír Gorej
2024-02-14 11:39:40 +01:00
committed by GitHub
parent 8b0991c5cc
commit 7addbd0eb5
19 changed files with 27 additions and 331 deletions

View File

@@ -54,11 +54,9 @@
"lint": "eslint --ext \".js,.jsx\" src test dev-helpers flavors",
"lint-errors": "eslint --quiet --ext \".js,.jsx\" src test dev-helpers flavors",
"lint-fix": "eslint --ext \".js,.jsx\" src test dev-helpers flavors --fix",
"test": "run-s lint-errors just-test-in-node test:unit-jest cy:ci",
"test-in-node": "run-s lint-errors just-test-in-node",
"just-test-in-node": "cross-env NODE_ENV=test BABEL_ENV=commonjs BROWSERSLIST_ENV=node-development mocha \"test/mocha/**/*.{js,jsx}\"",
"test": "run-s lint-errors test:unit cy:ci",
"test:artifact": "cross-env NODE_ENV=production BABEL_ENV=commonjs BROWSERSLIST_ENV=node-development jest --config ./config/jest/jest.artifact.config.js",
"test:unit-jest": "cross-env NODE_ENV=test BABEL_ENV=commonjs BROWSERSLIST_ENV=node-development jest --config ./config/jest/jest.unit.config.js",
"test:unit": "cross-env NODE_ENV=test BABEL_ENV=commonjs BROWSERSLIST_ENV=node-development jest --config ./config/jest/jest.unit.config.js",
"cy:mock-api": "json-server --watch test/e2e-selenium/db.json --port 3204",
"cy:server": "cross-env NODE_ENV=production BABEL_ENV=production BROWSERSLIST_ENV=browser-production webpack serve --config webpack/dev-e2e.js",
"cy:start": "run-p -r cy:server cy:mock-api",
@@ -144,7 +142,6 @@
"eslint": "^8.55.0",
"eslint-plugin-import": "^2.29.0",
"eslint-plugin-jest": "^27.6.3",
"eslint-plugin-mocha": "^10.2.0",
"eslint-plugin-react": "^7.33.2",
"esm": "=3.2.25",
"expect": "=29.7.0",
@@ -166,7 +163,6 @@
"lint-staged": "^15.2.2",
"local-web-server": "^5.3.1",
"mini-css-extract-plugin": "^2.8.0",
"mocha": "=8.4.0",
"npm-audit-ci-wrapper": "^3.0.2",
"npm-run-all": "^4.1.5",
"oauth2-server": "^2.4.1",