mirror of
https://github.com/nasa/openmct.git
synced 2025-02-20 09:26:45 +00:00
[Build] Update test runner
This commit is contained in:
parent
0a546cd50c
commit
e564baba1a
@ -34,6 +34,7 @@ module.exports = function(config) {
|
|||||||
// List of files / patterns to load in the browser.
|
// List of files / patterns to load in the browser.
|
||||||
// By default, files are also included in a script tag.
|
// By default, files are also included in a script tag.
|
||||||
files: [
|
files: [
|
||||||
|
{pattern: 'bower_components/**/*.js', included: false},
|
||||||
{pattern: 'src/**/*.js', included: false},
|
{pattern: 'src/**/*.js', included: false},
|
||||||
{pattern: 'example/**/*.js', included: false},
|
{pattern: 'example/**/*.js', included: false},
|
||||||
{pattern: 'platform/**/*.js', included: false},
|
{pattern: 'platform/**/*.js', included: false},
|
||||||
@ -49,7 +50,8 @@ module.exports = function(config) {
|
|||||||
// Preprocess matching files before serving them to the browser.
|
// Preprocess matching files before serving them to the browser.
|
||||||
// https://npmjs.org/browse/keyword/karma-preprocessor
|
// https://npmjs.org/browse/keyword/karma-preprocessor
|
||||||
preprocessors: {
|
preprocessors: {
|
||||||
'**/src/**/!(*Spec).js': [ 'coverage' ]
|
'src/**/src/**/!(*Spec).js': [ 'coverage' ],
|
||||||
|
'platform/**/src/**/!(*Spec).js': [ 'coverage' ]
|
||||||
},
|
},
|
||||||
|
|
||||||
// Test results reporter to use
|
// Test results reporter to use
|
||||||
|
27
test-main.js
27
test-main.js
@ -38,13 +38,32 @@ Object.keys(window.__karma__.files).forEach(function(file) {
|
|||||||
// Force es6-promise to load.
|
// Force es6-promise to load.
|
||||||
allTestFiles.unshift('es6-promise');
|
allTestFiles.unshift('es6-promise');
|
||||||
|
|
||||||
require.config({
|
requirejs.config({
|
||||||
// Karma serves files from the basePath defined in karma.conf.js
|
// Karma serves files from the basePath defined in karma.conf.js
|
||||||
baseUrl: '/base',
|
baseUrl: '/base',
|
||||||
|
|
||||||
paths: {
|
"paths": {
|
||||||
'es6-promise': 'platform/framework/lib/es6-promise-2.0.0.min',
|
"legacyRegistry": "src/legacyRegistry",
|
||||||
'moment': 'platform/telemetry/lib/moment.min'
|
"angular": "bower_components/angular/angular.min",
|
||||||
|
"angular-route": "bower_components/angular-route/angular-route.min",
|
||||||
|
"es6-promise": "bower_components/es6-promise/promise.min",
|
||||||
|
"moment": "bower_components/moment/moment",
|
||||||
|
"moment-duration-format": "bower_components/moment-duration-format/lib/moment-duration-format",
|
||||||
|
"screenfull": "bower_components/screenfull/dist/screenfull.min",
|
||||||
|
"text": "bower_components/text/text",
|
||||||
|
"uuid": "bower_components/node-uuid/uuid"
|
||||||
|
},
|
||||||
|
|
||||||
|
"shim": {
|
||||||
|
"angular": {
|
||||||
|
"exports": "angular"
|
||||||
|
},
|
||||||
|
"angular-route": {
|
||||||
|
"deps": [ "angular" ]
|
||||||
|
},
|
||||||
|
"moment-duration-format": {
|
||||||
|
"deps": [ "moment" ]
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
// dynamically load all test files
|
// dynamically load all test files
|
||||||
|
Loading…
x
Reference in New Issue
Block a user