Skip to content

Commit 9524dd6

Browse files
committed
Fix broken test
1 parent 83f8627 commit 9524dd6

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

src/Mvc/Mvc.ViewFeatures/test/HtmlHelperComponentExtensionsTests.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,10 @@ public async Task Rendering_ComponentWithJsInteropThrows()
101101
}));
102102

103103
// Assert
104-
Assert.Equal("JavaScript interoperability is not supported in the current environment.", exception.Message);
104+
Assert.Equal("JavaScript interop calls cannot be issued during server-side prerendering, " +
105+
"because the page has not yet loaded in the browser. Prerendered components must wrap any JavaScript " +
106+
"interop calls in conditional logic to ensure those interop calls are not attempted during prerendering.",
107+
exception.Message);
105108
}
106109

107110
[Fact]

src/Mvc/test/Mvc.FunctionalTests/BasicTests.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -481,6 +481,9 @@ public async Task ApplicationAssemblyPartIsListedAsFirstAssembly()
481481
var expected = new[]
482482
{
483483
"BasicWebSite",
484+
"Microsoft.AspNetCore.Components.Server",
485+
"Microsoft.AspNetCore.SpaServices",
486+
"Microsoft.AspNetCore.SpaServices.Extensions",
484487
"Microsoft.AspNetCore.Mvc.TagHelpers",
485488
"Microsoft.AspNetCore.Mvc.Razor",
486489
};

0 commit comments

Comments
 (0)