You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With <WasmEnableThreads>true</WasmEnableThreads> generated dotnet.js has assert to only be used in browser environment. When imported (w/o actually creating the runtime), following error is thrown:
This build of dotnet is multi-threaded, it doesn't support shell environments like V8 or NodeJS.
This breaks unit testing in node when the dotnet APIs are mocked and the runtime is not initalized, but still has to be imported. After removing the assertion unit testing in node works fine.
Is it possible to remove the assertion or move it to the runtime creation function?
Activity
ghost added
needs-area-labelAn area label is needed to ensure this gets routed to the appropriate area owners
Activity
pavelsavara commentedon Oct 2, 2023
This is by design. What are the use cases which you need to addressOh, I miss-read the description
pavelsavara commentedon Oct 2, 2023
yeah, MT on NodeJS is not even close to ready. Why are you importing the module when you mock it anyway ?
elringus commentedon Oct 2, 2023
I mock individual bindings, but not the whole module. Here is an example: https://github.com/Elringus/DotNetJS/blob/feat/revamp/Samples/App/test/computer.test.tsx (
backendis the dotnet module).[-][browser] Oveprotective MT assert breaking fair usage in unit tests[/-][+][browser][MT] support for NodeJS[/+]pavelsavara commentedon Mar 28, 2024
This needs emscripten bump to 3.1.52
lewing commentedon Mar 28, 2024
cc @radekdoulik