mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
imporve test configuration
This commit is contained in:
@@ -31,6 +31,12 @@ npm run build
|
||||
npm test
|
||||
```
|
||||
|
||||
## Running unit tests in browser
|
||||
|
||||
```sh
|
||||
npm test-browser
|
||||
```
|
||||
|
||||
This task rebuilds all the code, runs tslint, license checks and other quality check tools
|
||||
before performing unit testing.
|
||||
|
||||
|
@@ -53,11 +53,12 @@ module.exports = function (config) {
|
||||
'karma-jasmine',
|
||||
'karma-coverage',
|
||||
'karma-chrome-launcher',
|
||||
'karma-mocha-reporter'
|
||||
'karma-mocha-reporter',
|
||||
'karma-jasmine-html-reporter'
|
||||
],
|
||||
|
||||
// Coverage reporter generates the coverage
|
||||
reporters: ['mocha', 'coverage'],
|
||||
reporters: ['mocha', 'coverage', 'kjhtml'],
|
||||
|
||||
// Source files that you wanna generate coverage for.
|
||||
// Do not include tests or libraries (these files will be instrumented by Istanbul)
|
||||
@@ -67,7 +68,9 @@ module.exports = function (config) {
|
||||
|
||||
coverageReporter: {
|
||||
dir: 'coverage/',
|
||||
subdir: 'report',
|
||||
reporters: [
|
||||
{type: 'text'},
|
||||
{type: 'text-summary'},
|
||||
{type: 'json', subdir: '.', file: 'coverage-final.json'},
|
||||
{type: 'html'}
|
||||
|
@@ -18,9 +18,10 @@
|
||||
"licensecheck": "license-check",
|
||||
"tsc": "tsc",
|
||||
"pretest": "npm run build",
|
||||
"test": "karma start karma.conf.js",
|
||||
"test": "karma start karma.conf.js --reporters mocha,coverage --single-run",
|
||||
"test-browser": "karma start karma.conf.js --reporters kjhtml ",
|
||||
"posttest": "node_modules/.bin/remap-istanbul -i coverage/coverage-final.json -o coverage -t html",
|
||||
"coverage": "http-server -c-1 -o -p 9875 ./coverage",
|
||||
"coverage": "http-server -c-1 -o -p 9875 ./coverage/report",
|
||||
"prepublish": "npm run build"
|
||||
},
|
||||
"repository": {
|
||||
@@ -66,6 +67,7 @@
|
||||
"karma-coverage": "^1.0.0",
|
||||
"karma-jasmine": "~1.0.2",
|
||||
"karma-mocha-reporter": "^2.0.3",
|
||||
"karma-jasmine-html-reporter": "^0.2.0",
|
||||
"license-check": "^1.0.4",
|
||||
"remap-istanbul": "^0.6.3",
|
||||
"traceur": "^0.0.91",
|
||||
|
Reference in New Issue
Block a user