Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use spec reporter for karma #4552

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
67 changes: 38 additions & 29 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'],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this correct, previously this was a string and now an array?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I changed it for testing, will set it back to a string.

},
unit: {
coverageReporter: {
Expand All @@ -20,10 +20,10 @@ module.exports = {
},
},
travis: {
reporters: ['dots'],
reporters: ['spec'],
},
bamboo: {
browsers: ['PhantomJS'],
reporters: ['dots', 'junit'],
reporters: ['spec', 'junit'],
},
};
Loading