Skip to content

Conversation

@pavelsavara
Copy link
Member

@pavelsavara pavelsavara commented Feb 11, 2026

so that V8 testing works without --module

This will need follow up in benchmark, which uses test-main.js as it's main.js, we should change that anyway.

@pavelsavara pavelsavara added this to the 11.0.0 milestone Feb 11, 2026
@pavelsavara pavelsavara self-assigned this Feb 11, 2026
@pavelsavara pavelsavara added the arch-wasm WebAssembly architecture label Feb 11, 2026
Copilot AI review requested due to automatic review settings February 11, 2026 13:21
@dotnet-policy-service
Copy link
Contributor

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

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR renames the WASM test runner entrypoint from test-main.js to test-main.mjs so V8 can treat it as an ES module by default (avoiding the need for --module).

Changes:

  • Update HTML entrypoints and build/test infrastructure to reference test-main.mjs instead of test-main.js.
  • Update various MSBuild project properties/items that copy or point to the test runner JS file.
  • Update logging/comments in the browser runtime/test harness to reflect the new filename and align formatting.

Reviewed changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/tests/Common/wasm-test-runner/index.html Update module script reference to test-main.mjs.
src/tests/Common/wasm-test-runner/WasmTestRunner.proj Point WasmMainJSPath at test-main.mjs in runtime-test/.
src/tests/Common/Directory.Build.targets Copy test-main.mjs into $(CORE_ROOT)\runtime-test\.
src/mono/wasm/data/aot-tests/ProxyProjectForAOTOnHelix.proj Update WasmMainJSPath to test-main.mjs.
src/mono/wasm/Wasm.Build.Tests/Wasm.Build.Tests.csproj Copy test-main.mjs to test output instead of test-main.js.
src/mono/wasi/Wasi.Build.Tests/BuildTestBase.cs Copy test-main.mjs into generated temp projects.
src/mono/sample/wasm/browser-bench/Console/Wasm.Console.Bench.Sample.csproj Update WasmMainJSPath to test-main.mjs.
src/mono/sample/wasm/browser-bench/Console/Makefile Update MAIN_JS to test-main.mjs.
src/mono/browser/test-main.mjs Update log string to reflect .mjs name.
src/mono/browser/test-index.html Update module script reference to test-main.mjs.
src/mono/browser/runtime/loader/globals.ts Update “keep in sync” comment and minor formatting.
src/mono/browser/runtime/globals.ts Update “keep in sync” comment and minor formatting.
eng/testing/tests.browser.targets Copy/link test-main.mjs to wwwroot and default WasmMainJSPath to .mjs.
eng/testing/WasmRunnerTemplate.sh Default --js-file to test-main.mjs.
eng/testing/WasmRunnerTemplate.cmd Default --js-file to test-main.mjs.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 16 out of 16 changed files in this pull request and generated 1 comment.

Copilot AI review requested due to automatic review settings February 12, 2026 13:06
Copy link
Member

@ilonatommy ilonatommy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pavelsavara
Copy link
Member Author

There are places in the repo where we still have --module: https://github.com/search?q=repo%3Adotnet%2Fruntime%20%22--module%22&type=code

Done, one of them is not V8.

edit: and shouldn't we remove https://github.com/dotnet/runtime/blob/main/src/mono/browser/test-main.js ?

It's a rename
image

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 17 out of 17 changed files in this pull request and generated 2 comments.

@pavelsavara pavelsavara merged commit 5cefb54 into dotnet:main Feb 12, 2026
92 of 95 checks passed
@pavelsavara pavelsavara deleted the testing_on_v8 branch February 12, 2026 21:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

arch-wasm WebAssembly architecture area-System.Runtime.InteropServices.JavaScript os-browser Browser variant of arch-wasm

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants