mirror of
https://github.com/nasa/openmct.git
synced 2025-05-02 08:43:17 +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
|
||||
heroku:
|
||||
appname: openmctweb-staging-deux
|
||||
test:
|
||||
post:
|
||||
- npm run jshint --silent
|
||||
|
@ -57,14 +57,23 @@ define([], function () {
|
||||
rows = [],
|
||||
row,
|
||||
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) {
|
||||
row = {};
|
||||
domains.forEach(function (domain) {
|
||||
row[domain.name] = series.getDomainValue(i, domain.key);
|
||||
});
|
||||
ranges.forEach(function (range) {
|
||||
row[range.name] = series.getRangeValue(i, range.key);
|
||||
});
|
||||
copyDomainsToRow(row, i);
|
||||
copyRangesToRow(row, i);
|
||||
rows.push(row);
|
||||
}
|
||||
exportService.exportCSV(rows, { headers: headers });
|
||||
@ -77,4 +86,4 @@ define([], function () {
|
||||
};
|
||||
|
||||
return ExportTelemetryAsCSVAction;
|
||||
});
|
||||
});
|
||||
|
@ -20,7 +20,7 @@
|
||||
* at runtime from the About dialog for additional information.
|
||||
*****************************************************************************/
|
||||
|
||||
/*global module*/
|
||||
/*global module,process*/
|
||||
module.exports = function(config) {
|
||||
config.set({
|
||||
|
||||
@ -58,7 +58,7 @@ module.exports = function(config) {
|
||||
// Test results reporter to use
|
||||
// Possible values: 'dots', 'progress'
|
||||
// Available reporters: https://npmjs.org/browse/keyword/karma-reporter
|
||||
reporters: ['progress', 'coverage', 'html'],
|
||||
reporters: ['progress', 'coverage', 'html', 'junit'],
|
||||
|
||||
// Web server port.
|
||||
port: 9876,
|
||||
@ -79,7 +79,9 @@ module.exports = function(config) {
|
||||
|
||||
// Code coverage reporting.
|
||||
coverageReporter: {
|
||||
dir: "dist/coverage"
|
||||
dir: process.env.CIRCLE_ARTIFACTS ?
|
||||
process.env.CIRCLE_ARTIFACTS + '/coverage' :
|
||||
"dist/coverage"
|
||||
},
|
||||
|
||||
// HTML test reporting.
|
||||
@ -89,6 +91,10 @@ module.exports = function(config) {
|
||||
foldAll: false
|
||||
},
|
||||
|
||||
junitReporter: {
|
||||
outputDir: process.env.CIRCLE_TEST_REPORTS || 'target/junit'
|
||||
},
|
||||
|
||||
// Continuous Integration mode.
|
||||
// If true, Karma captures browsers, runs the tests and exits.
|
||||
singleRun: true
|
||||
|
@ -28,6 +28,7 @@
|
||||
"karma-coverage": "^0.5.3",
|
||||
"karma-html-reporter": "^0.2.7",
|
||||
"karma-jasmine": "^0.1.5",
|
||||
"karma-junit-reporter": "^0.3.8",
|
||||
"karma-phantomjs-launcher": "^1.0.0",
|
||||
"karma-requirejs": "^0.2.2",
|
||||
"lodash": "^3.10.1",
|
||||
@ -43,7 +44,7 @@
|
||||
"scripts": {
|
||||
"start": "node app.js",
|
||||
"test": "karma start --single-run",
|
||||
"jshint": "jshint platform example || exit 0",
|
||||
"jshint": "jshint platform example",
|
||||
"watch": "karma start",
|
||||
"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'",
|
||||
|
Loading…
x
Reference in New Issue
Block a user