Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
HarlonWang committed Aug 10, 2022
1 parent c4f1ba9 commit 075aedd
Showing 1 changed file with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -800,6 +800,20 @@ public void testPromiseUnhandledRejections10() {
context.destroyContext();
}

@Test
public void testPromiseUnhandledRejections11() {
thrown.expect(QuickJSException.class);
thrown.expectMessage("bad");

QuickJSContext context = QuickJSContext.create();
context.evaluate("new Promise((resolve, reject) => {\n" +
" resolve();\n" +
"}).then(() => {\n" +
" throw new Error('bad');\n" +
"});");
context.destroyContext();
}

// todo fix
// @Test
// public void testJSArraySetParseJSON() {
Expand Down

0 comments on commit 075aedd

Please sign in to comment.