parent
ad95601e3c
commit
94272af45b
|
@ -13,6 +13,7 @@ module.exports = function(config) {
|
|||
// zone-microtask must be included first as it contains a Promise monkey patch
|
||||
'node_modules/zone.js/dist/zone-microtask.js',
|
||||
'node_modules/zone.js/dist/long-stack-trace-zone.js',
|
||||
'node_modules/zone.js/dist/jasmine-patch.js',
|
||||
|
||||
'node_modules/traceur/bin/traceur-runtime.js',
|
||||
'node_modules/es6-module-loader/dist/es6-module-loader-sans-promises.src.js',
|
||||
|
|
|
@ -25,10 +25,9 @@ interface FakeAsyncZone extends NgZoneZone {
|
|||
* @returns {Function} The function wrapped to be executed in the fakeAsync zone
|
||||
*/
|
||||
export function fakeAsync(fn: Function): Function {
|
||||
// TODO(vicb) re-enable once the jasmine patch from zone.js is applied
|
||||
// if (global.zone._inFakeAsyncZone) {
|
||||
// throw new Error('fakeAsync() calls can not be nested');
|
||||
//}
|
||||
if ((<FakeAsyncZone>global.zone)._inFakeAsyncZone) {
|
||||
throw new Error('fakeAsync() calls can not be nested');
|
||||
}
|
||||
|
||||
var fakeAsyncZone = <FakeAsyncZone>global.zone.fork({
|
||||
setTimeout: _setTimeout,
|
||||
|
|
|
@ -37,14 +37,10 @@ export function main() {
|
|||
it('should work with inject()',
|
||||
inject([Parser], fakeAsync((parser) => { expect(parser).toBeAnInstanceOf(Parser); })));
|
||||
|
||||
if (!IS_DARTIUM) {
|
||||
it('should throw on nested calls', () => {
|
||||
// TODO(vicb): re-enable once the jasmine patch from zone.js is applied
|
||||
if (!IS_DARTIUM) return;
|
||||
expect(() => { fakeAsync(() => { fakeAsync(() => null)(); })(); })
|
||||
.toThrowError('fakeAsync() calls can not be nested');
|
||||
});
|
||||
}
|
||||
it('should throw on nested calls', () => {
|
||||
expect(() => { fakeAsync(() => { fakeAsync(() => null)(); })(); })
|
||||
.toThrowError('fakeAsync() calls can not be nested');
|
||||
});
|
||||
|
||||
it('should flush microtasks before returning', () => {
|
||||
var thenRan = false;
|
||||
|
|
|
@ -9567,7 +9567,7 @@
|
|||
}
|
||||
},
|
||||
"zone.js": {
|
||||
"version": "0.5.0"
|
||||
"version": "0.5.1"
|
||||
}
|
||||
},
|
||||
"name": "angular",
|
||||
|
|
|
@ -14792,9 +14792,9 @@
|
|||
}
|
||||
},
|
||||
"zone.js": {
|
||||
"version": "0.5.0",
|
||||
"from": "https://registry.npmjs.org/zone.js/-/zone.js-0.5.0.tgz",
|
||||
"resolved": "https://registry.npmjs.org/zone.js/-/zone.js-0.5.0.tgz"
|
||||
"version": "0.5.1",
|
||||
"from": "zone.js@0.5.1",
|
||||
"resolved": "https://registry.npmjs.org/zone.js/-/zone.js-0.5.1.tgz"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
"systemjs": "^0.9.1",
|
||||
"traceur": "0.0.87",
|
||||
"which": "~1",
|
||||
"zone.js": "0.5.0"
|
||||
"zone.js": "0.5.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"angular": "1.3.5",
|
||||
|
|
Loading…
Reference in New Issue