Increase testability through dependency injection
- Remove existing integration tests for hooks as they're redundant after this change. - Document the pattern in relevant documentation. - Introduce `useEnvironment` to increase testability. - Update components to inject dependencies rather than importing hooks directly.
This commit is contained in:
@@ -18,6 +18,7 @@ Common aspects for all tests:
|
||||
- Unit tests test each component in isolation.
|
||||
- All unit tests goes under [`./tests/unit`](./../tests/unit).
|
||||
- They rely on [stubs](./../tests/unit/shared/Stubs) for isolation.
|
||||
- Unit tests include also Vue component tests using `@vue/test-utils`.
|
||||
|
||||
### Unit tests structure
|
||||
|
||||
|
||||
Reference in New Issue
Block a user