Skip to content

Tests integration

Bozhidar Zashev edited this page Jun 1, 2025 · 1 revision

If you want to test components that use the BlazorTrace you will need to inject its services in the test context, by adding this at the end of the service injections (this example is using the Bunit library TestContext):

var Context = new TestContext();
//other serverises
Context.Services.AddBlazorTrace();

Clone this wiki locally