micropython/tests/ports/webassembly
Damien George 01a11ea45e webassembly/objjsproxy: Support arbitrary number of args with kwargs.
When calling from Python into JavaScript and passing along keyword
arguments, the FFI bindings currently only support at most 1 positional
argument. For example:

    import js
    js.func(1, b=2, c=3)

This commit fixes that by supporting arbitrary number of positional
arguments, in combination with keyword arguments.  So now the following
works:

    import js
    js.func(1, 2, c=3, d=4)

Tests are added for these new, supported cases.

Signed-off-by: Damien George <damien@micropython.org>
2025-10-06 12:35:20 +11:00
..
asyncio_await_resolve_no_arg.mjs webassembly/asyncio: Fix case where a Promise is resolved with no arg. 2024-05-13 11:48:41 +10:00
asyncio_await_resolve_no_arg.mjs.exp webassembly/asyncio: Fix case where a Promise is resolved with no arg. 2024-05-13 11:48:41 +10:00
asyncio_create_task.mjs webassembly: Add JavaScript-based asyncio support. 2024-04-24 16:24:00 +10:00
asyncio_create_task.mjs.exp webassembly: Add JavaScript-based asyncio support. 2024-04-24 16:24:00 +10:00
asyncio_sleep.mjs webassembly: Add JavaScript-based asyncio support. 2024-04-24 16:24:00 +10:00
asyncio_sleep.mjs.exp webassembly: Add JavaScript-based asyncio support. 2024-04-24 16:24:00 +10:00
asyncio_top_level_await.mjs webassembly/asyncio: Fix ThenableEvent to handle rejected thenables. 2025-09-30 17:39:15 +10:00
asyncio_top_level_await.mjs.exp webassembly/asyncio: Fix ThenableEvent to handle rejected thenables. 2025-09-30 17:39:15 +10:00
await_error_handling.mjs webassembly/proxy_c: Ensure objs thrown into generators are exceptions. 2024-05-13 11:52:17 +10:00
await_error_handling.mjs.exp webassembly/proxy_js: Create a special "undefined" type for Python. 2024-05-16 12:49:10 +10:00
await_js_async_py.mjs webassembly/proxy_c: Ensure return value of async fun is passed to JS. 2024-03-30 13:13:51 +11:00
await_js_async_py.mjs.exp webassembly/proxy_c: Ensure return value of async fun is passed to JS. 2024-03-30 13:13:51 +11:00
basic.js tests/ports/webassembly: Add webassembly JS tests. 2024-03-22 14:31:25 +11:00
basic.js.exp tests/ports/webassembly: Add webassembly JS tests. 2024-03-22 14:31:25 +11:00
filesystem.mjs tests/ports/webassembly: Add webassembly JS tests. 2024-03-22 14:31:25 +11:00
filesystem.mjs.exp tests/ports/webassembly: Add webassembly JS tests. 2024-03-22 14:31:25 +11:00
float.mjs tests/ports/webassembly: Add webassembly JS tests. 2024-03-22 14:31:25 +11:00
float.mjs.exp tests/ports/webassembly: Add webassembly JS tests. 2024-03-22 14:31:25 +11:00
fun_call.mjs webassembly/objjsproxy: Support arbitrary number of args with kwargs. 2025-10-06 12:35:20 +11:00
fun_call.mjs.exp webassembly/objjsproxy: Support arbitrary number of args with kwargs. 2025-10-06 12:35:20 +11:00
fun_proxy.mjs webassembly/proxy_js: Allow a Python proxy of a function to be undone. 2024-03-30 13:13:51 +11:00
fun_proxy.mjs.exp webassembly/proxy_js: Allow a Python proxy of a function to be undone. 2024-03-30 13:13:51 +11:00
fun_py_callback_js.mjs webassembly/proxy_js: Promote Python thenable to a Promise. 2024-03-30 13:13:51 +11:00
fun_py_callback_js.mjs.exp webassembly/proxy_js: Promote Python thenable to a Promise. 2024-03-30 13:13:51 +11:00
globals.mjs tests/ports/webassembly: Add webassembly JS tests. 2024-03-22 14:31:25 +11:00
globals.mjs.exp tests/ports/webassembly: Add webassembly JS tests. 2024-03-22 14:31:25 +11:00
heap_expand.mjs tests/ports/webassembly: Add webassembly JS tests. 2024-03-22 14:31:25 +11:00
heap_expand.mjs.exp webassembly: Improve identity and fix bug with lost JsProxy refs. 2025-09-26 14:07:07 +10:00
iterator.mjs webassembly/objpyproxy: Implement JS iterator protocol for Py iterables. 2024-05-07 00:20:56 +10:00
iterator.mjs.exp webassembly/objpyproxy: Implement JS iterator protocol for Py iterables. 2024-05-07 00:20:56 +10:00
js_proxy_attribute.mjs webassembly/objjsproxy: Lookup attributes without testing they exist. 2024-06-28 11:40:24 +10:00
js_proxy_attribute.mjs.exp webassembly/objjsproxy: Lookup attributes without testing they exist. 2024-06-28 11:40:24 +10:00
js_proxy_identity.mjs webassembly: Improve identity and fix bug with lost JsProxy refs. 2025-09-26 14:07:07 +10:00
js_proxy_identity.mjs.exp webassembly: Improve identity and fix bug with lost JsProxy refs. 2025-09-26 14:07:07 +10:00
js_proxy_iterator.mjs webassembly/objjsproxy: Implement proxying of JS iterable protocol. 2024-06-18 22:14:34 +10:00
js_proxy_iterator.mjs.exp webassembly/objjsproxy: Implement proxying of JS iterable protocol. 2024-06-18 22:14:34 +10:00
js_proxy_reuse_free.mjs webassembly: Improve identity and fix bug with lost JsProxy refs. 2025-09-26 14:07:07 +10:00
js_proxy_reuse_free.mjs.exp webassembly: Improve identity and fix bug with lost JsProxy refs. 2025-09-26 14:07:07 +10:00
jsffi_create_proxy.mjs tests/ports/webassembly: Add webassembly JS tests. 2024-03-22 14:31:25 +11:00
jsffi_create_proxy.mjs.exp webassembly/proxy_js: Create a special "undefined" type for Python. 2024-05-16 12:49:10 +10:00
jsffi_to_js.mjs tests/ports/webassembly: Add webassembly JS tests. 2024-03-22 14:31:25 +11:00
jsffi_to_js.mjs.exp webassembly/proxy_js: Create a special "undefined" type for Python. 2024-05-16 12:49:10 +10:00
method_bind_behaviour.mjs webassembly/objjsproxy: Fix binding of self to JavaScript methods. 2025-07-24 14:38:08 +10:00
method_bind_behaviour.mjs.exp webassembly/objjsproxy: Fix binding of self to JavaScript methods. 2025-07-24 14:38:08 +10:00
override_new.mjs tests/ports/webassembly: Add webassembly JS tests. 2024-03-22 14:31:25 +11:00
override_new.mjs.exp tests/ports/webassembly: Add webassembly JS tests. 2024-03-22 14:31:25 +11:00
promise_with_resolvers.mjs tests/ports/webassembly: Add webassembly JS tests. 2024-03-22 14:31:25 +11:00
promise_with_resolvers.mjs.exp tests/ports/webassembly: Add webassembly JS tests. 2024-03-22 14:31:25 +11:00
py_proxy_delete.mjs tests/ports/webassembly: Add webassembly JS tests. 2024-03-22 14:31:25 +11:00
py_proxy_delete.mjs.exp tests/ports/webassembly: Add webassembly JS tests. 2024-03-22 14:31:25 +11:00
py_proxy_dict_undefined.mjs webassembly/proxy_c: Return undefined if dict lookup failed on JS side. 2024-05-16 12:49:42 +10:00
py_proxy_dict_undefined.mjs.exp webassembly/proxy_c: Return undefined if dict lookup failed on JS side. 2024-05-16 12:49:42 +10:00
py_proxy_dict.mjs tests/ports/webassembly: Add webassembly JS tests. 2024-03-22 14:31:25 +11:00
py_proxy_dict.mjs.exp tests/ports/webassembly: Add webassembly JS tests. 2024-03-22 14:31:25 +11:00
py_proxy_get.mjs webassembly/objpyproxy: Avoid throwing on implicit symbols access. 2025-07-17 14:37:53 +10:00
py_proxy_get.mjs.exp webassembly/objpyproxy: Avoid throwing on implicit symbols access. 2025-07-17 14:37:53 +10:00
py_proxy_has.mjs webassembly/objpyproxy: Avoid throwing on symbol or iterator has-check. 2025-07-04 15:08:03 +10:00
py_proxy_has.mjs.exp webassembly/objpyproxy: Avoid throwing on symbol or iterator has-check. 2025-07-04 15:08:03 +10:00
py_proxy_identity.mjs tests/ports/webassembly: Move JsProxy identity test to separate file. 2025-09-26 14:02:11 +10:00
py_proxy_identity.mjs.exp tests/ports/webassembly: Move JsProxy identity test to separate file. 2025-09-26 14:02:11 +10:00
py_proxy_own_keys.mjs tests/ports/webassembly: Add webassembly JS tests. 2024-03-22 14:31:25 +11:00
py_proxy_own_keys.mjs.exp tests/ports/webassembly: Add webassembly JS tests. 2024-03-22 14:31:25 +11:00
py_proxy_set.mjs tests/ports/webassembly: Add webassembly JS tests. 2024-03-22 14:31:25 +11:00
py_proxy_set.mjs.exp tests/ports/webassembly: Add webassembly JS tests. 2024-03-22 14:31:25 +11:00
py_proxy_to_js.mjs tests/ports/webassembly: Add webassembly JS tests. 2024-03-22 14:31:25 +11:00
py_proxy_to_js.mjs.exp webassembly/proxy_js: Revert back to converting Py None to JS null. 2024-05-16 12:44:43 +10:00
register_js_module.js tests/ports/webassembly: Expand test for registerJsModule. 2025-09-30 11:04:05 +10:00
register_js_module.js.exp tests/ports/webassembly: Expand test for registerJsModule. 2025-09-30 11:04:05 +10:00
run_python_async2.mjs tests/ports/webassembly: Add webassembly JS tests. 2024-03-22 14:31:25 +11:00
run_python_async2.mjs.exp tests/ports/webassembly: Add webassembly JS tests. 2024-03-22 14:31:25 +11:00
run_python_async_error.mjs webassembly/proxy_c: Reject promises with a PythonError instance. 2024-05-06 14:04:13 +10:00
run_python_async_error.mjs.exp webassembly/proxy_c: Reject promises with a PythonError instance. 2024-05-06 14:04:13 +10:00
run_python_async_no_await.mjs webassembly/api: Resolve thenables returned from runPythonAsync. 2024-05-07 11:33:05 +10:00
run_python_async_no_await.mjs.exp webassembly/api: Resolve thenables returned from runPythonAsync. 2024-05-07 11:33:05 +10:00
run_python_async.mjs tests/ports/webassembly: Add webassembly JS tests. 2024-03-22 14:31:25 +11:00
run_python_async.mjs.exp webassembly/proxy_js: Reuse JsProxy ref if object matches. 2025-07-31 11:40:50 +10:00
this_behaviour.mjs tests/ports/webassembly: Add webassembly JS tests. 2024-03-22 14:31:25 +11:00
this_behaviour.mjs.exp tests/ports/webassembly: Add webassembly JS tests. 2024-03-22 14:31:25 +11:00
various.js tests/ports/webassembly: Add webassembly JS tests. 2024-03-22 14:31:25 +11:00
various.js.exp tests/ports/webassembly: Add webassembly JS tests. 2024-03-22 14:31:25 +11:00