diff --git a/src/mono/wasm/Wasm.Build.Tests/BuildTestBase.cs b/src/mono/wasm/Wasm.Build.Tests/BuildTestBase.cs index cda5afe8e6dce7..74f5e33598a1b4 100644 --- a/src/mono/wasm/Wasm.Build.Tests/BuildTestBase.cs +++ b/src/mono/wasm/Wasm.Build.Tests/BuildTestBase.cs @@ -822,7 +822,7 @@ protected static void AssertFile(string file0, string file1, string? label = nul return result; } - protected void AssertBlazorBundle(string config, bool isPublish, bool dotnetWasmFromRuntimePack, string targetFramework = DefaultTargetFrameworkForBlazor, string? binFrameworkDir = null) + protected void AssertBlazorBundle(string config, bool isPublish, bool dotnetWasmFromRuntimePack, string targetFramework = DefaultTargetFrameworkForBlazor, string? binFrameworkDir = null, bool expectFingerprinting = false) { binFrameworkDir ??= FindBlazorBinFrameworkDir(config, isPublish, targetFramework); @@ -832,7 +832,7 @@ protected void AssertBlazorBundle(string config, bool isPublish, bool dotnetWasm "Expected dotnet.native.wasm to be same as the runtime pack", same: dotnetWasmFromRuntimePack); - string? dotnetJsPath = Directory.EnumerateFiles(binFrameworkDir, "dotnet.native.*.js").FirstOrDefault(); + string? dotnetJsPath = Directory.EnumerateFiles(binFrameworkDir, expectFingerprinting ? "dotnet.native.*.js" : "dotnet.native.js").FirstOrDefault(); Assert.True(dotnetJsPath != null, $"Could not find blazor's dotnet*js in {binFrameworkDir}"); AssertFile(Path.Combine(s_buildEnv.GetRuntimeNativeDir(targetFramework), "dotnet.native.js"),