Skip to content

Latest commit

 

History

History
85 lines (41 loc) · 1.94 KB

File metadata and controls

85 lines (41 loc) · 1.94 KB

Verify.Bunit

Discussions Build status NuGet Status

include: intro

See Milestones for release notes.

Sponsors

include: sponsors

Component

The below samples use the following Component:

snippet: BlazorApp/TestComponent.razor

NuGet

Usage

Enable at startup:

snippet: BunitEnable

This test:

snippet: BunitComponentTest

Will produce:

The component rendered as html ...Component.verified.html:

snippet: Tests/Samples.Component.verified.html

And the current model rendered as txt ...Component.verified.txt:

snippet: Tests/Samples.Component.verified.txt

Exclude Component

Rendering of the Component state (Samples.Component.verified.txt from above) can be excluded by using excludeComponent.

snippet: BunitEnableExcludeComponent

Scrubbing

Integrity check

In Blazor an integrity check is applied to the dotnet.*.js file.

<script src="_framework/dotnet.5.0.2.js" defer="" integrity="sha256-AQfZ6sKmq4EzOxN3pymKJ1nlGQaneN66/2mcbArnIJ8=" crossorigin="anonymous"></script>

This line will change when the dotnet SDK is updated.

Noise in rendered template

Blazor uses <!--!--> to delineate components in the resulting html. Some empty lines can be rendered when components are stitched together.

Resulting scrubbing

snippet: scrubbers

Icon

Helmet designed by Leonidas Ikonomou from The Noun Project.