mirror of
https://github.com/nasa/openmct.git
synced 2025-05-03 01:02:52 +00:00
Merge pull request #714 from nasa/ci-test-reporter
[Build] run JSHint on circleci, generate test reports
This commit is contained in:
commit
8511dc93b5
@ -13,3 +13,6 @@ deployment:
|
|||||||
branch: mobile
|
branch: mobile
|
||||||
heroku:
|
heroku:
|
||||||
appname: openmctweb-staging-deux
|
appname: openmctweb-staging-deux
|
||||||
|
test:
|
||||||
|
post:
|
||||||
|
- npm run jshint --silent
|
||||||
|
@ -57,14 +57,23 @@ define([], function () {
|
|||||||
rows = [],
|
rows = [],
|
||||||
row,
|
row,
|
||||||
i;
|
i;
|
||||||
|
|
||||||
|
function copyDomainsToRow(row, index) {
|
||||||
|
domains.forEach(function (domain) {
|
||||||
|
row[domain.name] = series.getDomainValue(index, domain.key);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function copyRangesToRow(row, index) {
|
||||||
|
ranges.forEach(function (range) {
|
||||||
|
row[range.name] = series.getRangeValue(index, range.key);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
for (i = 0; i < series.getPointCount(); i += 1) {
|
for (i = 0; i < series.getPointCount(); i += 1) {
|
||||||
row = {};
|
row = {};
|
||||||
domains.forEach(function (domain) {
|
copyDomainsToRow(row, i);
|
||||||
row[domain.name] = series.getDomainValue(i, domain.key);
|
copyRangesToRow(row, i);
|
||||||
});
|
|
||||||
ranges.forEach(function (range) {
|
|
||||||
row[range.name] = series.getRangeValue(i, range.key);
|
|
||||||
});
|
|
||||||
rows.push(row);
|
rows.push(row);
|
||||||
}
|
}
|
||||||
exportService.exportCSV(rows, { headers: headers });
|
exportService.exportCSV(rows, { headers: headers });
|
||||||
@ -77,4 +86,4 @@ define([], function () {
|
|||||||
};
|
};
|
||||||
|
|
||||||
return ExportTelemetryAsCSVAction;
|
return ExportTelemetryAsCSVAction;
|
||||||
});
|
});
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
/*global module*/
|
/*global module,process*/
|
||||||
module.exports = function(config) {
|
module.exports = function(config) {
|
||||||
config.set({
|
config.set({
|
||||||
|
|
||||||
@ -58,7 +58,7 @@ module.exports = function(config) {
|
|||||||
// Test results reporter to use
|
// Test results reporter to use
|
||||||
// Possible values: 'dots', 'progress'
|
// Possible values: 'dots', 'progress'
|
||||||
// Available reporters: https://npmjs.org/browse/keyword/karma-reporter
|
// Available reporters: https://npmjs.org/browse/keyword/karma-reporter
|
||||||
reporters: ['progress', 'coverage', 'html'],
|
reporters: ['progress', 'coverage', 'html', 'junit'],
|
||||||
|
|
||||||
// Web server port.
|
// Web server port.
|
||||||
port: 9876,
|
port: 9876,
|
||||||
@ -79,7 +79,9 @@ module.exports = function(config) {
|
|||||||
|
|
||||||
// Code coverage reporting.
|
// Code coverage reporting.
|
||||||
coverageReporter: {
|
coverageReporter: {
|
||||||
dir: "dist/coverage"
|
dir: process.env.CIRCLE_ARTIFACTS ?
|
||||||
|
process.env.CIRCLE_ARTIFACTS + '/coverage' :
|
||||||
|
"dist/coverage"
|
||||||
},
|
},
|
||||||
|
|
||||||
// HTML test reporting.
|
// HTML test reporting.
|
||||||
@ -89,6 +91,10 @@ module.exports = function(config) {
|
|||||||
foldAll: false
|
foldAll: false
|
||||||
},
|
},
|
||||||
|
|
||||||
|
junitReporter: {
|
||||||
|
outputDir: process.env.CIRCLE_TEST_REPORTS || 'target/junit'
|
||||||
|
},
|
||||||
|
|
||||||
// Continuous Integration mode.
|
// Continuous Integration mode.
|
||||||
// If true, Karma captures browsers, runs the tests and exits.
|
// If true, Karma captures browsers, runs the tests and exits.
|
||||||
singleRun: true
|
singleRun: true
|
||||||
|
@ -28,6 +28,7 @@
|
|||||||
"karma-coverage": "^0.5.3",
|
"karma-coverage": "^0.5.3",
|
||||||
"karma-html-reporter": "^0.2.7",
|
"karma-html-reporter": "^0.2.7",
|
||||||
"karma-jasmine": "^0.1.5",
|
"karma-jasmine": "^0.1.5",
|
||||||
|
"karma-junit-reporter": "^0.3.8",
|
||||||
"karma-phantomjs-launcher": "^1.0.0",
|
"karma-phantomjs-launcher": "^1.0.0",
|
||||||
"karma-requirejs": "^0.2.2",
|
"karma-requirejs": "^0.2.2",
|
||||||
"lodash": "^3.10.1",
|
"lodash": "^3.10.1",
|
||||||
@ -43,7 +44,7 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "node app.js",
|
"start": "node app.js",
|
||||||
"test": "karma start --single-run",
|
"test": "karma start --single-run",
|
||||||
"jshint": "jshint platform example || exit 0",
|
"jshint": "jshint platform example",
|
||||||
"watch": "karma start",
|
"watch": "karma start",
|
||||||
"jsdoc": "jsdoc -c jsdoc.json -r -d target/docs/api",
|
"jsdoc": "jsdoc -c jsdoc.json -r -d target/docs/api",
|
||||||
"otherdoc": "node docs/gendocs.js --in docs/src --out target/docs --suppress-toc 'docs/src/index.md|docs/src/process/index.md'",
|
"otherdoc": "node docs/gendocs.js --in docs/src --out target/docs --suppress-toc 'docs/src/index.md|docs/src/process/index.md'",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user