mirror of
https://github.com/nasa/openmct.git
synced 2025-01-18 02:39:56 +00:00
Merge remote-tracking branch 'origin/master' into persist-on-mutation-825
This commit is contained in:
commit
7265b241a2
@ -23,13 +23,14 @@
|
|||||||
/*global require,window*/
|
/*global require,window*/
|
||||||
var allTestFiles = [];
|
var allTestFiles = [];
|
||||||
var TEST_REGEXP = /(Spec)\.js$/;
|
var TEST_REGEXP = /(Spec)\.js$/;
|
||||||
|
var SRC_REGEXP = /^\/base\/(src|platform).*\.js$/;
|
||||||
|
|
||||||
var pathToModule = function(path) {
|
var pathToModule = function(path) {
|
||||||
return path.replace(/^\/base\//, '').replace(/\.js$/, '');
|
return path.replace(/^\/base\//, '').replace(/\.js$/, '');
|
||||||
};
|
};
|
||||||
|
|
||||||
Object.keys(window.__karma__.files).forEach(function(file) {
|
Object.keys(window.__karma__.files).forEach(function(file) {
|
||||||
if (TEST_REGEXP.test(file)) {
|
if (TEST_REGEXP.test(file) || SRC_REGEXP.test(file)) {
|
||||||
// Normalize paths to RequireJS module names.
|
// Normalize paths to RequireJS module names.
|
||||||
allTestFiles.push(pathToModule(file));
|
allTestFiles.push(pathToModule(file));
|
||||||
}
|
}
|
||||||
@ -38,6 +39,11 @@ 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');
|
||||||
|
|
||||||
|
// Drop legacyRegistry, since it is at a different path by RequireJS config
|
||||||
|
allTestFiles = allTestFiles.filter(function (file) {
|
||||||
|
return file.indexOf('legacyRegistry') === -1;
|
||||||
|
});
|
||||||
|
|
||||||
requirejs.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',
|
||||||
|
Loading…
Reference in New Issue
Block a user