diff --git a/src/ProjectTemplates/test/Templates.Blazor.Tests/Templates.Blazor.Tests.csproj b/src/ProjectTemplates/test/Templates.Blazor.Tests/Templates.Blazor.Tests.csproj
index c83139c69a34..b6d476906fb3 100644
--- a/src/ProjectTemplates/test/Templates.Blazor.Tests/Templates.Blazor.Tests.csproj
+++ b/src/ProjectTemplates/test/Templates.Blazor.Tests/Templates.Blazor.Tests.csproj
@@ -47,6 +47,13 @@
+
+
+ PreserveNewest
+
+
+
+
diff --git a/src/ProjectTemplates/test/Templates.Blazor.Tests/TestAssets/WebWorker/TestWorkerMethods.cs b/src/ProjectTemplates/test/Templates.Blazor.Tests/TestAssets/WebWorker/TestWorkerMethods.cs
new file mode 100644
index 000000000000..4bba70c73df8
--- /dev/null
+++ b/src/ProjectTemplates/test/Templates.Blazor.Tests/TestAssets/WebWorker/TestWorkerMethods.cs
@@ -0,0 +1,26 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+using System.Runtime.InteropServices.JavaScript;
+using System.Runtime.Versioning;
+using System.Text.Json;
+
+namespace TestWorkerExports;
+
+[SupportedOSPlatform("browser")]
+public static partial class TestWorkerMethods
+{
+ [JSExport]
+ public static int Add(int a, int b) => a + b;
+
+ [JSExport]
+ public static string Echo(string input) => input;
+
+ [JSExport]
+ public static string GetPersonJson()
+ => JsonSerializer.Serialize(new { Name = "Alice", Age = 30 });
+
+ [JSExport]
+ public static string ThrowError()
+ => throw new InvalidOperationException("Test exception from worker");
+}
diff --git a/src/ProjectTemplates/test/Templates.Blazor.Tests/TestAssets/WebWorker/WebWorkerTest.razor b/src/ProjectTemplates/test/Templates.Blazor.Tests/TestAssets/WebWorker/WebWorkerTest.razor
new file mode 100644
index 000000000000..2ff7e39594ff
--- /dev/null
+++ b/src/ProjectTemplates/test/Templates.Blazor.Tests/TestAssets/WebWorker/WebWorkerTest.razor
@@ -0,0 +1,125 @@
+@* Licensed to the .NET Foundation under one or more agreements. *@
+@* The .NET Foundation licenses this file to you under the MIT license. *@
+
+@page "/webworker-test"
+
+@using WorkerLib
+@inject IJSRuntime JSRuntime
+@implements IAsyncDisposable
+
+WebWorker Test
+
+