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

Refactor nps tests #153

Open
kentcdodds opened this issue Jul 16, 2017 · 1 comment
Open

Refactor nps tests #153

kentcdodds opened this issue Jul 16, 2017 · 1 comment

Comments

@kentcdodds
Copy link
Collaborator

Let's get rid of sinon and just use jest's built-in mock functions.

Also, we use jest.mock in a pretty sub-optimal way. We really shouldn't be doing jest.mock calls inside of functions. Those should go at the top of the module where we're calling it.

Also, doing inline jest.mock is not the best. We should probably write these mocks in __mocks__ directories (see the Jest docs).

@Miklet
Copy link
Collaborator

Miklet commented Sep 5, 2017

#162 removed sinon from tests. Mocks still need improvement 🙂

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

No branches or pull requests

3 participants