mirror of https://github.com/status-im/reagent.git
Add karma junit reporter & other config
This commit is contained in:
parent
f31607b777
commit
03ff2ffe87
|
@ -21,3 +21,4 @@ node_modules
|
|||
pre-render
|
||||
|
||||
test-environments/*/outsite
|
||||
test-environments/*/junit
|
||||
|
|
|
@ -843,6 +843,16 @@
|
|||
"integrity": "sha1-y4YF7w4R+ab20o9Wul298m84mSM=",
|
||||
"dev": true
|
||||
},
|
||||
"karma-junit-reporter": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/karma-junit-reporter/-/karma-junit-reporter-1.2.0.tgz",
|
||||
"integrity": "sha1-T5xAzt+xo5X4rvh2q/lhiZF8Y5Y=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"path-is-absolute": "1.0.1",
|
||||
"xmlbuilder": "8.2.2"
|
||||
}
|
||||
},
|
||||
"kind-of": {
|
||||
"version": "3.2.2",
|
||||
"resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
|
||||
|
@ -1569,6 +1579,12 @@
|
|||
"integrity": "sha1-OS2LotDxw00e4tYw8V0O+2jhBIo=",
|
||||
"dev": true
|
||||
},
|
||||
"xmlbuilder": {
|
||||
"version": "8.2.2",
|
||||
"resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-8.2.2.tgz",
|
||||
"integrity": "sha1-aSSGc0ELS6QuGmE2VR0pIjNap3M=",
|
||||
"dev": true
|
||||
},
|
||||
"xmlhttprequest-ssl": {
|
||||
"version": "1.5.3",
|
||||
"resolved": "https://registry.npmjs.org/xmlhttprequest-ssl/-/xmlhttprequest-ssl-1.5.3.tgz",
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
"devDependencies": {
|
||||
"karma": "^1.7.1",
|
||||
"karma-chrome-launcher": "^2.2.0",
|
||||
"karma-cljs-test": "^0.1.0"
|
||||
"karma-cljs-test": "^0.1.0",
|
||||
"karma-junit-reporter": "^1.2.0"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1133,6 +1133,16 @@
|
|||
"integrity": "sha1-y4YF7w4R+ab20o9Wul298m84mSM=",
|
||||
"dev": true
|
||||
},
|
||||
"karma-junit-reporter": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/karma-junit-reporter/-/karma-junit-reporter-1.2.0.tgz",
|
||||
"integrity": "sha1-T5xAzt+xo5X4rvh2q/lhiZF8Y5Y=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"path-is-absolute": "1.0.1",
|
||||
"xmlbuilder": "8.2.2"
|
||||
}
|
||||
},
|
||||
"kind-of": {
|
||||
"version": "3.2.2",
|
||||
"resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
|
||||
|
@ -2019,6 +2029,12 @@
|
|||
"integrity": "sha1-OS2LotDxw00e4tYw8V0O+2jhBIo=",
|
||||
"dev": true
|
||||
},
|
||||
"xmlbuilder": {
|
||||
"version": "8.2.2",
|
||||
"resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-8.2.2.tgz",
|
||||
"integrity": "sha1-aSSGc0ELS6QuGmE2VR0pIjNap3M=",
|
||||
"dev": true
|
||||
},
|
||||
"xmlhttprequest-ssl": {
|
||||
"version": "1.5.3",
|
||||
"resolved": "https://registry.npmjs.org/xmlhttprequest-ssl/-/xmlhttprequest-ssl-1.5.3.tgz",
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
"devDependencies": {
|
||||
"karma": "^1.7.1",
|
||||
"karma-chrome-launcher": "^2.2.0",
|
||||
"karma-cljs-test": "^0.1.0"
|
||||
"karma-cljs-test": "^0.1.0",
|
||||
"karma-junit-reporter": "^1.2.0"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1133,6 +1133,16 @@
|
|||
"integrity": "sha1-y4YF7w4R+ab20o9Wul298m84mSM=",
|
||||
"dev": true
|
||||
},
|
||||
"karma-junit-reporter": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/karma-junit-reporter/-/karma-junit-reporter-1.2.0.tgz",
|
||||
"integrity": "sha1-T5xAzt+xo5X4rvh2q/lhiZF8Y5Y=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"path-is-absolute": "1.0.1",
|
||||
"xmlbuilder": "8.2.2"
|
||||
}
|
||||
},
|
||||
"kind-of": {
|
||||
"version": "3.2.2",
|
||||
"resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
|
||||
|
@ -2020,6 +2030,12 @@
|
|||
"integrity": "sha1-OS2LotDxw00e4tYw8V0O+2jhBIo=",
|
||||
"dev": true
|
||||
},
|
||||
"xmlbuilder": {
|
||||
"version": "8.2.2",
|
||||
"resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-8.2.2.tgz",
|
||||
"integrity": "sha1-aSSGc0ELS6QuGmE2VR0pIjNap3M=",
|
||||
"dev": true
|
||||
},
|
||||
"xmlhttprequest-ssl": {
|
||||
"version": "1.5.3",
|
||||
"resolved": "https://registry.npmjs.org/xmlhttprequest-ssl/-/xmlhttprequest-ssl-1.5.3.tgz",
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
"devDependencies": {
|
||||
"karma": "^1.7.1",
|
||||
"karma-chrome-launcher": "^2.2.0",
|
||||
"karma-cljs-test": "^0.1.0"
|
||||
"karma-cljs-test": "^0.1.0",
|
||||
"karma-junit-reporter": "^1.2.0"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,35 @@
|
|||
/* jshint strict: false */
|
||||
/* globals configData */
|
||||
|
||||
/*
|
||||
* Doo reads this file from classpath runners/karma.conf.js
|
||||
* This sets up junit reporter.
|
||||
*/
|
||||
|
||||
var path = require('path');
|
||||
|
||||
// Doo writes this file to /tmp, so can't use relative require directly
|
||||
var logger = require(process.cwd() + '/node_modules/karma/lib/logger.js');
|
||||
|
||||
module.exports = function(config) {
|
||||
|
||||
var suite = path.basename(process.cwd());
|
||||
|
||||
// Hide two unncessary warnings
|
||||
logger.create('web-server', 'error');
|
||||
logger.create('watcher', 'error');
|
||||
|
||||
configData.plugins = ['karma-*'];
|
||||
|
||||
configData.logLevel = config.LOG_WARN;
|
||||
|
||||
configData.reporters = ['dots', 'junit'];
|
||||
configData.junitReporter = {
|
||||
outputDir: (process.env.CIRCLE_TEST_REPORTS || 'junit'),
|
||||
outputFile: suite + '.xml',
|
||||
suite: suite, // suite will become the package name attribute in xml testsuite element
|
||||
useBrowserName: false // add browser name to report and classes names
|
||||
};
|
||||
|
||||
config.set(configData);
|
||||
};
|
Loading…
Reference in New Issue