1
0
mirror of https://github.com/bitwarden/browser synced 2026-03-01 19:11:22 +00:00

Feature/move to jest (#744)

* Switch to jest

* Fix jslib-angular package name

* Make angular test project

* Split up tests by jslib project

* Remove obsolete node test script

* Use legacy deps with jest-preset-angular

* Move web tests to common

* Remove build from pipeline

This was only being used because we were not using ts runners.
We are now, so build is unnecessary
This commit is contained in:
Matt Gibson
2022-03-28 10:00:42 -04:00
committed by GitHub
parent 13ef7aea7d
commit a4fba0e1c5
112 changed files with 5526 additions and 2221 deletions

View File

@@ -14,20 +14,17 @@
"license": "GPL-3.0",
"scripts": {
"clean": "rimraf dist/**/*",
"build": "npm run clean && ttsc",
"build:watch": "npm run clean && ttsc -watch",
"lint": "eslint . && prettier --check .",
"lint:fix": "eslint . --fix",
"prettier": "prettier --write .",
"test": "karma start ./spec/support/karma.conf.js --single-run",
"test:watch": "karma start ./spec/support/karma.conf.js",
"test:node": "jasmine-ts -r tsconfig-paths/register",
"test:node:watch": "nodemon -w ./angular -w ./common -w ./electron -w ./node -w ./shared -w ./spec --ext \"ts,js,mjs,json\" --exec jasmine-ts -r tsconfig-paths/register",
"test": "jest",
"test:watch": "jest --watch",
"test:watch:all": "jest --watchAll",
"prepare": "husky install"
},
"devDependencies": {
"@fluffy-spoon/substitute": "^1.202.0",
"@types/jasmine": "^3.7.6",
"@types/jest": "^27.4.1",
"@types/node": "^16.11.12",
"@typescript-eslint/eslint-plugin": "^5.10.1",
"@typescript-eslint/parser": "^5.10.1",
@@ -39,20 +36,9 @@
"eslint-plugin-import": "^2.25.4",
"form-data": "4.0.0",
"husky": "^7.0.4",
"jasmine": "^3.7.0",
"jasmine-core": "^3.7.1",
"jasmine-ts": "^0.4.0",
"jasmine-ts-console-reporter": "^3.1.1",
"jest": "^27.5.1",
"jest-preset-angular": "^11.1.1",
"jsdom": "^16.5.3",
"karma": "^6.3.2",
"karma-chrome-launcher": "^3.1.0",
"karma-cli": "^2.0.0",
"karma-detect-browsers": "^2.3.3",
"karma-firefox-launcher": "^2.1.0",
"karma-jasmine": "^4.0.1",
"karma-jasmine-html-reporter": "^1.5.4",
"karma-safari-launcher": "^1.0.0",
"karma-webpack": "^4.0.2",
"lint-staged": "^12.1.2",
"nodemon": "^2.0.7",
"prettier": "2.5.1",