Skip to content

Commit

Permalink
Make service singleton
Browse files Browse the repository at this point in the history
  • Loading branch information
linkdotnet committed Jul 14, 2023
1 parent 38fbbec commit eac1446
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/bunit.web/Extensions/TestServiceProviderExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public static IServiceCollection AddDefaultTestContextServices(this IServiceColl
// bUnit specific services
services.AddSingleton<TestContextBase>(testContext);
services.AddSingleton<WebTestRenderer>();
services.AddScoped<MarkupMatchesRenderer>();
services.AddSingleton<MarkupMatchesRenderer>();
services.AddSingleton<TestRenderer>(s => s.GetRequiredService<WebTestRenderer>());
services.AddSingleton<Renderer>(s => s.GetRequiredService<WebTestRenderer>());
services.AddSingleton<ITestRenderer>(s => s.GetRequiredService<WebTestRenderer>());
Expand Down

0 comments on commit eac1446

Please sign in to comment.