From 5b96f525759819a18651cf45c9b4c0f87970c79f Mon Sep 17 00:00:00 2001 From: Sam Clegg Date: Tue, 23 Dec 2025 11:51:07 -0800 Subject: [PATCH] Use addToLibrary rather than mergeInto in test code. NFC Except for the one test that actually tests that old function. --- test/test_jslib.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/test/test_jslib.py b/test/test_jslib.py index 9f7cce742f2b7..3e96c6f17fb2e 100644 --- a/test/test_jslib.py +++ b/test/test_jslib.py @@ -290,7 +290,7 @@ def test_jslib_invalid_decorator(self): @also_without_bigint def test_jslib_i53abi(self): create_file('lib.js', r''' -mergeInto(LibraryManager.library, { +addToLibrary({ jslibfunc__i53abi: true, jslibfunc__sig: 'j', jslibfunc: (x) => { return 42 }, @@ -307,7 +307,7 @@ def test_jslib_i53abi(self): def test_jslib_i53abi_errors(self): create_file('lib.js', r''' -mergeInto(LibraryManager.library, { +addToLibrary({ jslibfunc__i53abi: true, jslibfunc: (x) => { return 42 }, }); @@ -316,7 +316,7 @@ def test_jslib_i53abi_errors(self): self.assertContained("error: JS library error: '__i53abi' decorator requires '__sig' decorator: 'jslibfunc'", err) create_file('lib.js', r''' -mergeInto(LibraryManager.library, { +addToLibrary({ jslibfunc__i53abi: true, jslibfunc__sig: 'ii', jslibfunc: (x) => { return 42 }, @@ -336,6 +336,7 @@ def test_jslib_invalid_proxy_mode(self): self.assertContained("error: JS library error: invalid proxying mode 'jslibfunc__proxy: foo' specified", err) def test_jslib_legacy(self): + # Test that the legacy `mergeInfo` function work instead of `addToLibrary` create_file('lib.js', r''' mergeInto(LibraryManager.library, { jslibfunc: (x) => { return 42 },