You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Init encourages writing tests that do not use the framework at all. You can just call the component start functions directly, passing in dependencies, and mocking them as needed.
However, for larger-scoped tests, this is inconvenient. Init makes it easy to refactor, adding and removing dependencies. But this means tests have to be updated accordingly.
Furthermore, one should test the system configuration, making sure that all dependencies are valid.
A more convenient way would be to start with the production config and:
only select the components we want
remove components that should not run in tests, e.g. databases and clients to external APIs
add test doubles
This can be done by transforming the configuration, but it would be cool to have a better API to do that.
The text was updated successfully, but these errors were encountered:
Init encourages writing tests that do not use the framework at all. You can just call the component start functions directly, passing in dependencies, and mocking them as needed.
However, for larger-scoped tests, this is inconvenient. Init makes it easy to refactor, adding and removing dependencies. But this means tests have to be updated accordingly.
Furthermore, one should test the system configuration, making sure that all dependencies are valid.
A more convenient way would be to start with the production config and:
This can be done by transforming the configuration, but it would be cool to have a better API to do that.
The text was updated successfully, but these errors were encountered: