Skip to content

Commit 4d2fb9b

Browse files
committed
Disallow uncaught exceptions
1 parent 0c65d18 commit 4d2fb9b

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

src/actions/tests/pause.spec.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ import {
22
actions,
33
selectors,
44
createStore,
5-
getHistory
5+
getHistory,
6+
makeSource
67
} from "../../utils/test-head";
78

89
const { isStepping } = selectors;
@@ -43,6 +44,7 @@ describe("pause", () => {
4344
const { dispatch, getState } = createStore(mockThreadClient);
4445
const mockPauseInfo = createPauseInfo();
4546

47+
await dispatch(actions.newSource(makeSource("foo1")));
4648
await dispatch(actions.paused(mockPauseInfo));
4749
const stepped = dispatch(actions.stepIn());
4850
expect(isStepping(getState())).toBeTruthy();
@@ -66,6 +68,7 @@ describe("pause", () => {
6668
const { dispatch } = createStore(mockThreadClient);
6769
const mockPauseInfo = createPauseInfo();
6870

71+
await dispatch(actions.newSource(makeSource("foo1")));
6972
await dispatch(actions.paused(mockPauseInfo));
7073
await dispatch(actions.resumed());
7174

@@ -74,6 +77,8 @@ describe("pause", () => {
7477

7578
it("resuming when not paused", async () => {
7679
const { dispatch } = createStore(mockThreadClient);
80+
81+
await dispatch(actions.newSource(makeSource("foo1")));
7782
await dispatch(actions.resumed());
7883
expect(getHistory("RESUME").length).toEqual(0);
7984
});

src/client/firefox/tests/onconnect.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ const debuggerClient = {
3535
const actions = {
3636
_sources: [],
3737
connect: () => {},
38-
38+
setWorkers: () => {},
3939
newSources: function(sources) {
4040
return new Promise(resolve => {
4141
setTimeout(() => {

src/test/tests-setup.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,5 @@ setConfig(config);
2828

2929
process.on("unhandledRejection", (reason, p) => {
3030
console.log("Unhandled Rejection at:", p, "reason:", reason);
31+
throw reason;
3132
});

0 commit comments

Comments
 (0)