Skip to content

Commit f5d7467

Browse files
authored
Use addToLibrary rather than mergeInto in test code. NFC (emscripten-core#26002)
Except for the one test that actually tests that old function.
1 parent bb5665b commit f5d7467

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

test/test_jslib.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ def test_jslib_invalid_decorator(self):
290290
@also_without_bigint
291291
def test_jslib_i53abi(self):
292292
create_file('lib.js', r'''
293-
mergeInto(LibraryManager.library, {
293+
addToLibrary({
294294
jslibfunc__i53abi: true,
295295
jslibfunc__sig: 'j',
296296
jslibfunc: (x) => { return 42 },
@@ -307,7 +307,7 @@ def test_jslib_i53abi(self):
307307

308308
def test_jslib_i53abi_errors(self):
309309
create_file('lib.js', r'''
310-
mergeInto(LibraryManager.library, {
310+
addToLibrary({
311311
jslibfunc__i53abi: true,
312312
jslibfunc: (x) => { return 42 },
313313
});
@@ -316,7 +316,7 @@ def test_jslib_i53abi_errors(self):
316316
self.assertContained("error: JS library error: '__i53abi' decorator requires '__sig' decorator: 'jslibfunc'", err)
317317

318318
create_file('lib.js', r'''
319-
mergeInto(LibraryManager.library, {
319+
addToLibrary({
320320
jslibfunc__i53abi: true,
321321
jslibfunc__sig: 'ii',
322322
jslibfunc: (x) => { return 42 },
@@ -336,6 +336,7 @@ def test_jslib_invalid_proxy_mode(self):
336336
self.assertContained("error: JS library error: invalid proxying mode 'jslibfunc__proxy: foo' specified", err)
337337

338338
def test_jslib_legacy(self):
339+
# Test that the legacy `mergeInfo` function work instead of `addToLibrary`
339340
create_file('lib.js', r'''
340341
mergeInto(LibraryManager.library, {
341342
jslibfunc: (x) => { return 42 },

0 commit comments

Comments
 (0)