Skip to content

Commit 52e4c9c

Browse files
authored
Update writing-razor-tests.md
1 parent b6737a2 commit 52e4c9c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

docs/site/docs/getting-started/writing-razor-tests.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ A test for a Blazor component can be written in a Blazor _test_ component using
1515
> [!WARNING]
1616
> Razor tests are currently only compatible with using xUnit as the general purpose testing framework.
1717
18+
> [!IMPORTANT]
19+
> Make sure the project SDK type is set to `<Project Sdk="Microsoft.NET.Sdk.Razor">`, instead of the default `<Project Sdk="Microsoft.NET.Sdk">` that is used with standard testing projects. See <xref:create-test-project> for a guide on setting up bUnit test projects.
20+
1821
## Creating a Test Specific `_Imports.razor` File
1922

2023
Razor tests are written in Blazor test components. To make our lives a little easier, let’s first set up a `_Imports.razor` file with the "using directives" we are going to be using throughout our tests. Simply add the following `_Imports.razor` to the root folder where you will be placing your Blazor test components:

0 commit comments

Comments
 (0)