Questions tagged [msw]

Mock Service Worker is an API mocking library that uses Service Worker API to intercept actual requests.

184 questions
0
votes
1 answer

React Jest tests failing with MSW

I have created a basic React application and configured MSW following the instructions to setup for unit tests (node environment) and browser The App component uses a custom hook useFormSubmission and renders a simple form with a username text field…
Hasnain
  • 1,879
  • 2
  • 13
  • 12
-1
votes
0 answers

MSW init - throw Error(`yargs parser supports a minimum Node.js version of ${minNodeVersion}

I'm trying to set up the MSW CLI (https://mswjs.io/docs/getting-started/integrate/browser) and I'm getting this error below: throw Error(`yargs parser supports a minimum Node.js version of ${minNodeVersion}. Read our version support policy:…
-1
votes
2 answers

Mock server error - The script has an unsupported MIME type ('text/html')

When i running my app i get this error : I'm using msw versin: 0.39.2 My msw file in the public folder : and this is my msw file : /* eslint-disable */ /* tslint:disable */ /** * Mock Service Worker (0.39.2). * @see…
yanir midler
  • 2,153
  • 1
  • 4
  • 16
-2
votes
1 answer

Freeze get query hooks progress at "pending"

And stop entire fetch work in "Loading.." like this screenshot. ================================================================== ================================================================== RTK-Query setup is here. import { createApi,…
Laststance
  • 116
  • 1
  • 9
1 2 3
12
13