Skip to content

Commit 00b1ff5

Browse files
committed
Use explicit throw
1 parent 3beeb76 commit 00b1ff5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/test_other.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12779,7 +12779,7 @@ def test_config_closure_compiler(self):
1277912779
def test_node_unhandled_rejection(self):
1278012780
create_file('pre.js', '''
1278112781
async function foo() {
12782-
var a = missing;
12782+
abort("this error will become an unhandled rejection");
1278312783
}
1278412784
async function doReject() {
1278512785
return foo();
@@ -12800,7 +12800,7 @@ def test_node_unhandled_rejection(self):
1280012800
self.build('main.c', emcc_args=['--pre-js=pre.js', '-sNODEJS_CATCH_REJECTION'])
1280112801
output = self.run_js('main.js', assert_returncode=NON_ZERO)
1280212802
self.assertContained('unhandledRejection', read_file('main.js'))
12803-
self.assertContained('ReferenceError: missing is not defined', output)
12803+
self.assertContained('RuntimeError: Aborted(this error will become an unhandled rejection)', output)
1280412804
self.assertContained('at foo (', output)
1280512805

1280612806
# Without NODEJS_CATCH_REJECTION we expect node to log the unhandled rejection

0 commit comments

Comments
 (0)