Open DoryZi opened 3 years ago
Have you set "resetMocks" Jest configuration to "false"?
Also your test should have "mockResponse(enTermsOfUse)". No need for the complex response you have.
Also where are you making that call? It should be inside the test case itself or in a beforeEach
I have a create react app project. With the following component:
I have setupTests.ts
the and test: const enTermsOfUse = '
How the await fetch in the LegalPage always returns undefined. Am I doing something wrong or is there a bug?