Created
November 17, 2015 18:05
-
-
Save fictitious/37bf4736f0492ec0f942 to your computer and use it in GitHub Desktop.
Testcase for systemjs builder loadConfig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Builder = require('../index'); | |
var fs = require('fs'); | |
var Promise = require('rsvp').Promise; | |
suite('Test loadConfig with baseURL + packages', function() { | |
test('loadConfig with baseURL + packages', function(done) { | |
var configFile1 = 'test/output/builder1Config.js'; | |
var configFile2 = 'test/output/builder2Config.js'; | |
fs.writeFileSync(configFile1, 'System.config({baseURL: "base1", packages: {p1: {main: "index1.js"}}});'); | |
fs.writeFileSync(configFile2, 'System.config({baseURL: "base2", packages: {p2: {main: "index2.js"}}});'); | |
var builder1 = new Builder(); | |
var builder2 = new Builder(); | |
var p1 = builder1.loadConfig(configFile1); | |
var p2 = builder2.loadConfig(configFile2); | |
Promise.all([p1, p2]).then(function() { | |
console.log("builder1 baseURL: " + builder1.loader.baseURL); | |
console.log("builder2 baseURL: " + builder2.loader.baseURL); | |
}).then(done, done); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment