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

Better test support #16

Open
ferdinand-beyer opened this issue Aug 24, 2024 · 0 comments
Open

Better test support #16

ferdinand-beyer opened this issue Aug 24, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@ferdinand-beyer
Copy link
Owner

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.

@ferdinand-beyer ferdinand-beyer added the enhancement New feature or request label Aug 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant