dotnet / runtime

.NET is a cross-platform runtime for cloud, mobile, desktop, and IoT apps.
https://docs.microsoft.com/dotnet/core/
MIT License
14.86k stars 4.63k forks source link

[browser] Unit tests for generated code in JSInterop #92870

Open maraf opened 11 months ago

maraf commented 11 months ago

Check that each argument, exception and return value is marshalled max once and only when appropriate

ghost commented 11 months ago

Tagging subscribers to 'arch-wasm': @lewing See info in area-owners.md if you want to be subscribed.

Issue Details
Check that each argument, exception and return value is marshalled max once and only when appropriate - Arguments should be unmarshalled always - Exception should be marshalled only if exception is raised - Return value should be marshalled only if exception didn't occur
Author: maraf
Assignees: -
Labels: `arch-wasm`, `test-enhancement`, `area-System.Runtime.InteropServices.JavaScript`, `os-browser`
Milestone: 9.0.0
maraf commented 11 months ago

We could use mock library to mock marshalling classes and check what was called