Skip to content

Commit

Permalink
fix(power-doctest): add try-catch
Browse files Browse the repository at this point in the history
  • Loading branch information
azu committed Aug 25, 2019
1 parent 93a1bbe commit 5e5e8da
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,13 @@ Also, you should consider to use { "runMode": "any" }` : ""}`));
}
}
});
const script = new VMScript(poweredCode, options.filePath);
vm.run(script, options.filePath);
try {
const script = new VMScript(poweredCode, options.filePath);
vm.run(script, options.filePath);
} catch (error) {
restoreListener();
reject(error);
}
// No assertion code
if (totalAssertionCount === 0) {
restoreListener();
Expand Down

0 comments on commit 5e5e8da

Please sign in to comment.