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

[Improvment] Unit Tests - mocking and implementation of true unit tests #2291

Open
ftoromanoff opened this issue Mar 13, 2024 · 0 comments
Open

Comments

@ftoromanoff
Copy link
Contributor

A first PR: #2183 aims at mocking the Fetch in the unit tests using the package sinon.
It was done in the optics to get the units test independent to the network and to know when a test is failing because of it.

But to go further, and implement 'better' units test we should use sinon (or something else) to mock everything that might be use to test a specific fonctionality.
For instance to test dataSourceProvider we should mock the layer that are needed instead of mocking the fethc that weill be use to instanciate that same layer.

@ftoromanoff ftoromanoff changed the title [Improvment] Unit Tests - mocking and reel unit test [Improvment] Unit Tests - mocking and real unit tests Mar 13, 2024
@ftoromanoff ftoromanoff changed the title [Improvment] Unit Tests - mocking and real unit tests [Improvment] Unit Tests - mocking and implementation of true unit tests Mar 13, 2024
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

No branches or pull requests

1 participant