mirror of
https://github.com/systemjs/systemjs.git
synced 2026-02-01 15:59:54 +00:00
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:
parent
11d51443b2
commit
2e48d0231a
3
dist/system.js
vendored
3
dist/system.js
vendored
@ -2125,4 +2125,5 @@ var $__curScript, __eval;
|
||||
}
|
||||
})();
|
||||
|
||||
})(this);
|
||||
})(typeof window != 'undefined' ? window : (typeof WorkerGlobalScope != 'undefined' ?
|
||||
self : global));
|
||||
|
||||
@ -102,4 +102,5 @@ var $__curScript, __eval;
|
||||
}
|
||||
})();
|
||||
|
||||
})(this);
|
||||
})(typeof window != 'undefined' ? window : (typeof WorkerGlobalScope != 'undefined' ?
|
||||
self : global));
|
||||
|
||||
@ -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",
|
||||
|
||||
18
test/test.js
18
test/test.js
@ -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();
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
})();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user