Fixed node tests with new WebWorker support

Previous changes to make SystemJS support WebWorkers mistakenly broke
Node, this fixes it.
This commit is contained in:
Matthew Phillips 2014-08-20 07:36:27 -05:00
parent 11d51443b2
commit 2e48d0231a
4 changed files with 15 additions and 11 deletions

3
dist/system.js vendored
View File

@ -2125,4 +2125,5 @@ var $__curScript, __eval;
}
})();
})(this);
})(typeof window != 'undefined' ? window : (typeof WorkerGlobalScope != 'undefined' ?
self : global));

View File

@ -102,4 +102,5 @@ var $__curScript, __eval;
}
})();
})(this);
})(typeof window != 'undefined' ? window : (typeof WorkerGlobalScope != 'undefined' ?
self : global));

View File

@ -10,7 +10,7 @@
"author": "Guy Bedford",
"license": "MIT",
"dependencies": {
"es6-module-loader": "~0.8.1"
"es6-module-loader": "~0.8.2"
},
"devDependencies": {
"qunit": "^0.6.2",

View File

@ -558,13 +558,15 @@ asyncTest('AMD -> System.register circular -> ES6', function() {
}, err);
});
asyncTest('Using SystemJS in a Web Worker', function() {
var worker = new Worker('tests/worker.js');
worker.onmessage = function(e) {
ok(e.data.amd === 'AMD Module');
ok(e.data.es6 === 'ES6 Module');
start();
};
});
if(typeof window !== 'undefined' && window.Worker) {
asyncTest('Using SystemJS in a Web Worker', function() {
var worker = new Worker('tests/worker.js');
worker.onmessage = function(e) {
ok(e.data.amd === 'AMD Module');
ok(e.data.es6 === 'ES6 Module');
start();
};
});
}
})();