I'm setting up a jasmine test suite in the browser, and Jasmine requires you load scripts in a specific order, and that those scripts provide global variables. Yuck, but what are you gonna do.
I've got this working to an extent but it's ugly:
System.import('jasmine-core').
then(function() {
return System.import('jasmine-core/lib/jasmine-core/jasmine-html.js');
}).
then(function() {
return System.import('jasmine-core/lib/jasmine-core/boot')
}).
then(function(a, b) {
// Do the stuff that runs tests
I feel like I should be able to do this:
System.import('jasmine-core').
then(System.import('jasmine-core/lib/jasmine-core/jasmine-html.js')).
then(System.import("jasmine-core/lib/jasmine-core/boot')
}).
then(function(a, b) {
But when I do that the globals are lost and jasmine-html fails. I also suspect there's an even simpler way to do this, perhaps via an array send to the promise, or through the config.js file and maps but the docs don't make it clear. At least to me - all my attempts have failed.
I suspect the experts here will know off the top of their head. Thanks.
System.import('jasmine-core').
then(() => System.import('jasmine-core/lib/jasmine-core/jasmine-html.js')). then(() => System.import('jasmine-core/lib/jasmine-core/boot')). then(() => {
});