1
0
mirror of https://github.com/bitwarden/browser synced 2026-01-05 18:13:26 +00:00

Add support for running unit tests (#381)

* Add test runner.

* Fix tests. Add tests for UtilsService.getDomain

* Test getHostname.

* Add two missing test cases and fix getDomain.
This commit is contained in:
Oscar Hinton
2017-11-17 22:33:58 +01:00
committed by Kyle Spearrin
parent f9b00c6871
commit 4531846ff8
6 changed files with 164 additions and 22 deletions

View File

@@ -8,9 +8,11 @@
"prod": "gulp build && webpack --config webpack.prod.js",
"dist": "gulp build && webpack --config webpack.prod.js && gulp dist",
"lint": "tslint src/**/*.ts || true",
"lint:fix": "tslint src/**/*.ts --fix"
"lint:fix": "tslint src/**/*.ts --fix",
"test": "karma start"
},
"devDependencies": {
"@types/jasmine": "^2.8.2",
"angular": "1.6.6",
"angular-animate": "1.6.6",
"angular-sweetalert": "1.1.2",
@@ -37,7 +39,16 @@
"gulp-zip": "4.0.0",
"html-loader": "^0.5.1",
"html-webpack-plugin": "^2.30.1",
"jasmine-core": "^2.8.0",
"jasmine-spec-reporter": "^4.2.1",
"jshint": "2.9.5",
"karma": "^1.7.1",
"karma-chrome-launcher": "^2.2.0",
"karma-cli": "^1.0.1",
"karma-coverage-istanbul-reporter": "^1.3.0",
"karma-jasmine": "^1.1.0",
"karma-jasmine-html-reporter": "^0.2.2",
"karma-typescript": "^3.0.8",
"less": "^3.0.0-alpha.3",
"less-loader": "^4.0.5",
"ng-infinite-scroll": "1.3.0",