Merge pull request #12243 from edx/usman/tnl4416-spec-nesting

When using RequireJS load spec files one by one.
This commit is contained in:
Usman Khalid
2016-04-29 17:09:57 +05:00
13 changed files with 75 additions and 24 deletions

View File

@@ -770,7 +770,9 @@
testFiles[i] = '/base/' + testFiles[i];
}
require(testFiles, function () {
// Jasmine has a global stack for creating a tree of specs. We need to load
// spec files one by one, otherwise some end up getting nested under others.
window.requireSerial(testFiles, function () {
// start test run, once Require.js is done
window.__karma__.start();
});

View File

@@ -73,7 +73,8 @@ var libraryFiles = [
{pattern: 'xmodule_js/common_static/js/vendor/slick.core.js', included: true},
{pattern: 'xmodule_js/common_static/js/vendor/slick.grid.js', included: true},
{pattern: 'xmodule_js/common_static/js/libs/jasmine-waituntil.js', included: true},
{pattern: 'xmodule_js/common_static/js/libs/jasmine-extensions.js', included: true}
{pattern: 'xmodule_js/common_static/js/libs/jasmine-extensions.js', included: true},
{pattern: 'common/js/utils/require-serial.js', included: true}
];
// Paths to source JavaScript files