Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions test/test_jslib.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 },
Expand All @@ -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 },
});
Expand All @@ -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 },
Expand All @@ -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 },
Expand Down