Skip to content

Commit 626587b

Browse files
authored
Fix instance.test_embind_val_coro_propogate_js_error. NFC (#24475)
This was recently landed in #23653 but that change went through CI before we added testing for MODULARIZE=instance. Setting `onRuntimeInitialized` is not generally support in call cases. e.g. WASM_ASYNC_COMPILATION=0 or MODULARIZE=instance.
1 parent f98a4bb commit 626587b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/test_core.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7598,13 +7598,13 @@ def test_embind_val_coro_propogate_cpp_exception(self):
75987598

75997599
def test_embind_val_coro_propogate_js_error(self):
76007600
self.set_setting('EXCEPTION_STACK_TRACES')
7601-
create_file('post.js', r'''Module.onRuntimeInitialized = () => {
7601+
create_file('pre.js', r'''Module.onRuntimeInitialized = () => {
76027602
Module.failingPromise().then(
76037603
console.log,
76047604
err => console.error(`rejected with: ${err.message}`)
76057605
);
76067606
}''')
7607-
self.emcc_args += ['-std=c++20', '--bind', '--post-js=post.js', '-fexceptions']
7607+
self.emcc_args += ['-std=c++20', '--bind', '--pre-js=pre.js', '-fexceptions']
76087608
self.do_runf('embind/test_val_coro.cpp', 'rejected with: bang from JS promise!\n')
76097609

76107610
def test_embind_dynamic_initialization(self):

0 commit comments

Comments
 (0)