When configuring unit tests, access to the ServiceCollection is needed so that application dependencies can be registered and mocked out before the Blazor page is rendered. The TestHost needs a constructor that allows an IServiceCollection instance to be injected to allow this.
When configuring unit tests, access to the ServiceCollection is needed so that application dependencies can be registered and mocked out before the Blazor page is rendered. The TestHost needs a constructor that allows an IServiceCollection instance to be injected to allow this.