-
Notifications
You must be signed in to change notification settings - Fork 11
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
How to configurate your library for typescript tests? (ts7016) #6
Comments
somemodule.spec.ts
and typings/fetch-mock-jest.ts I have an error:
|
Please try v1.2.0 of this library and reopen the issue if it's still broken |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I am using ts-jest & want to mock fetch responses (for browser code).
First of all, after installing fetch-mock-jest, in jest setup file I should write
global.fetchMock = require('fetch-mock-jest');
is it right or it should be
global.fetch = require('fetch-mock-jest').sandbox();
?In ts tests I can't write global.fetchMock or fetchMock without global declaring
or default importing
import fetchMock from 'fetch-mock-jest';
But if I am doing such things, why I need to make changes in jest setup script?
Can you provide d.ts file for using typed fetchMock methods?
The text was updated successfully, but these errors were encountered: