Skip to content

Commit

Permalink
Install and configure karma-junit-reporter (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
Steve Hobbs authored Jul 21, 2020
1 parent fa18395 commit 5e29889
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 12 deletions.
10 changes: 6 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ orbs:
jobs:
build-and-test:
executor:
name: node/default
name: node/default
tag: '12-browsers'
steps:
- checkout
Expand All @@ -15,7 +15,9 @@ jobs:
- run:
name: Upload coverage
command: ./node_modules/.bin/codecov
- store_test_results:
path: projects/auth0-angular/test-results
workflows:
build-and-test:
jobs:
- build-and-test
build-and-test:
jobs:
- build-and-test
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,6 @@ testem.log
# System Files
.DS_Store
Thumbs.db

# Tests
test-results
18 changes: 18 additions & 0 deletions package-lock.json

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

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
"karma-coverage-istanbul-reporter": "~3.0.2",
"karma-jasmine": "~3.3.0",
"karma-jasmine-html-reporter": "^1.5.0",
"karma-junit-reporter": "^2.0.1",
"ng-packagr": "^10.0.0",
"protractor": "~7.0.0",
"ts-node": "~8.3.0",
Expand Down
20 changes: 12 additions & 8 deletions projects/auth0-angular/karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,30 +9,34 @@ module.exports = function (config) {
require('karma-jasmine'),
require('karma-chrome-launcher'),
require('karma-jasmine-html-reporter'),
require('karma-junit-reporter'),
require('karma-coverage-istanbul-reporter'),
require('@angular-devkit/build-angular/plugins/karma')
require('@angular-devkit/build-angular/plugins/karma'),
],
client: {
clearContext: false // leave Jasmine Spec Runner output visible in browser
clearContext: false, // leave Jasmine Spec Runner output visible in browser
},
coverageIstanbulReporter: {
dir: require('path').join(__dirname, '../../coverage/auth0-angular'),
reports: ['html', 'lcovonly', 'text-summary'],
fixWebpackSourcePaths: true
fixWebpackSourcePaths: true,
},
reporters: ['progress', 'kjhtml'],
reporters: ['progress', 'kjhtml', 'junit'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['Chrome'],
customLaunchers: {
ChromeHeadlessCI: {
base: 'ChromeHeadless',
flags: ['--no-sandbox']
}
base: 'ChromeHeadless',
flags: ['--no-sandbox'],
},
},
singleRun: false,
restartOnFileChange: true
restartOnFileChange: true,
junitReporter: {
outputDir: 'test-results',
},
});
};

0 comments on commit 5e29889

Please sign in to comment.