python (65.2k questions)
javascript (44.3k questions)
reactjs (22.7k questions)
java (20.8k questions)
c# (17.4k questions)
html (16.3k questions)
r (13.7k questions)
android (13k questions)
What must I do to get this Jest test with Mock Service Worker for React hook to work?
I want to use Jest and Mock Service Worker to test a React Hook with a fetch call
The test look like this:
import React from 'react'
import App from './App'
import {render,screen} from '@testing-libr...
stein korsveien
Votes: 0
Answers: 1
MSW unit testing API in success & error scenario
I am using MSW for local development and unit testing.
#API fetch
const { loading, error, data } = useFetch('https://made.up/api/usage')
#handler.js
import { rest } from 'msw'
export const handlers...
khushboo29
Votes: 0
Answers: 1
Mock Service Worker with Gatsby.js
i'm using Mirage.js to fake api call's but mirage is causing some issues on our Gatsby project.
i had the idea of using with Mock Service Worker(MSW) instead.
i'm receiving an error when using setupWo...

Johann Kaltner Dev
Votes: 0
Answers: 1
MSW request handler not working in playwright test
I have a Nextjs project with tests in playwright and for mocking API, I am using Mock Service Worker (MSW) library.
I have installed and set up everything and also when I run the MSW worker in the _ap...
Raj
Votes: 0
Answers: 1