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
let execute_result = worker.execute_module(&test_module).await;
execute_result?;
This leads to a quirk where both main_module and test_module would return true if import.meta.main was checked inside those modules. This is a bug in module loading implementation in deno_core, where JsRuntime::execute_module() treats entry-point as a "main" module.
This should be fixed by providing a second method (JsRuntime::execute_main_module()) that should be used for top-level module and JsRuntime::execute_module() should be used for executing other modules that are not top-level.
The text was updated successfully, but these errors were encountered:
In
test_runner.rs
there's:deno/cli/tools/test_runner.rs
Lines 302 to 308 in 76d3430
This leads to a quirk where both
main_module
andtest_module
would returntrue
ifimport.meta.main
was checked inside those modules. This is a bug in module loading implementation indeno_core
, whereJsRuntime::execute_module()
treats entry-point as a "main" module.This should be fixed by providing a second method (
JsRuntime::execute_main_module()
) that should be used for top-level module andJsRuntime::execute_module()
should be used for executing other modules that are not top-level.The text was updated successfully, but these errors were encountered: