Skip to content

Commit

Permalink
use spec reporter for karma (#4552)
Browse files Browse the repository at this point in the history
  • Loading branch information
tomaskikutis authored Jun 19, 2024
1 parent 3250d4a commit dcedbe0
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 27 deletions.
4 changes: 3 additions & 1 deletion karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ module.exports = function(config) {
'karma-ng-html2js-preprocessor',
'karma-sourcemap-loader',
'karma-webpack',
'karma-spec-reporter',
],

preprocessors: {
Expand Down Expand Up @@ -54,7 +55,8 @@ module.exports = function(config) {
},

// test results reporter to use
reporters: ['dots'],
// options: 'progress', 'dots', 'spec'(via "karma-spec-reporter" package)
reporters: ['spec'],

// web server port
port: 8080,
Expand Down
49 changes: 29 additions & 20 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@
"karma-jasmine": "^1.1.1",
"karma-ng-html2js-preprocessor": "^1.0.0",
"karma-sourcemap-loader": "^0.3.7",
"karma-spec-reporter": "0.0.36",
"karma-webpack": "^2.0.13",
"react-addons-test-utils": "^15.6.0",
"react-test-renderer": "^16.13.1",
Expand All @@ -160,7 +161,7 @@
"gettext-extract": "grunt gettext:extract",
"postinstall": "node ./tasks/patch-package.js && node tasks/generate-placeholder-file-for-extension-styles.js",
"test": "npm run lint && npm run unit && node tasks/verify-client-api-changes.js",
"debug-unit-tests": "karma start karma.conf.js --browsers=Chrome",
"debug-unit-tests": "karma start --reporters=progress --browsers=Chrome",
"unit": "karma start --single-run",
"lint": "tsc -p scripts --noEmit && eslint --parser=@typescript-eslint/parser --ext .js --ext .jsx --ext .ts --ext .tsx scripts e2e/client tasks",
"lint-fix": "eslint --fix --parser=@typescript-eslint/parser --ext .js --ext .jsx --ext .ts --ext .tsx scripts e2e/client tasks",
Expand Down
10 changes: 5 additions & 5 deletions tasks/options/karma.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ module.exports = {
configFile: 'karma.conf.js',
singleRun: true,
autoWatch: false,
reporters: ['dots'],
reporters: ['spec'],
},
single: {
reporters: 'dots',
reporters: 'spec',
},
watch: {
singleRun: false,
autoWatch: true,
reporters: 'dots',
reporters: 'progress',
},
unit: {
coverageReporter: {
Expand All @@ -20,10 +20,10 @@ module.exports = {
},
},
travis: {
reporters: ['dots'],
reporters: ['spec'],
},
bamboo: {
browsers: ['PhantomJS'],
reporters: ['dots', 'junit'],
reporters: ['spec', 'junit'],
},
};

0 comments on commit dcedbe0

Please sign in to comment.