Skip to content

Commit

Permalink
Add async test with an uncaught error to debug jasmine/jasmine#529
Browse files Browse the repository at this point in the history
  • Loading branch information
lathonez committed May 17, 2017
1 parent 4802ba5 commit 181f19b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"@types/jasmine": "2.5.41",
"@types/node": "7.0.4",
"codecov": "1.0.1",
"jasmine-core": "2.5.2",
"jasmine-core": "2.6.1",
"jasmine-spec-reporter": "3.2.0",
"karma": "1.4.1",
"karma-chrome-launcher": "2.0.0",
Expand Down
12 changes: 12 additions & 0 deletions src/app/app.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,16 @@ describe('ClickerApp', () => {
expect(instance['menu']['close']).toHaveBeenCalled();
expect(instance['nav'].setRoot).toHaveBeenCalledWith(Page2);
});

it('fails on an uncaught async error', () => {
// should fail somewhere because of this?
setTimeout(
(() => {
throw 'kaboom';
}),
1
);

expect(true).toEqual(true);
});
});

0 comments on commit 181f19b

Please sign in to comment.