Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get an instance of the JS engine switcher by using DI #75

Conversation

Taritsyn
Copy link
Contributor

@Taritsyn Taritsyn commented Feb 6, 2024

Hello!

Currently, an instance of the JS engine switcher is getting by using a JsEngineSwitcher.Current property which is a simple implementation of the Singleton pattern. This architecture makes it much more difficult to test by using the WebApplicationFactory from ASP.NET Core testing package and leads to errors.

This PR solves problem by moving to standard ASP.NET Core DI.

@madskristensen madskristensen merged commit d09542e into ligershark:master Feb 6, 2024
1 check passed
@madskristensen
Copy link
Member

Thanks

@Taritsyn
Copy link
Contributor Author

Taritsyn commented Feb 6, 2024

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants