Skip to content
This repository was archived by the owner on Feb 26, 2024. It is now read-only.

Commit 81d5f49

Browse files
committed
fix: throw if a zone does not define an onError hook
1 parent f7badb6 commit 81d5f49

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Diff for: test/zone.spec.js

+7
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,13 @@ describe('Zone.patch', function () {
223223
});
224224
});
225225

226+
227+
it('should throw if onError is not defined', function () {
228+
expect(function () {
229+
zone.run(throwError);
230+
}).toThrow();
231+
});
232+
226233
it('should fire onError if a function run by a zone throws', function () {
227234
var errorSpy = jasmine.createSpy();
228235
var myZone = zone.fork({

0 commit comments

Comments
 (0)