Skip to content

Using MSW with supertest #2202

Answered by silvenon
silvenon asked this question in Q&A
Discussion options

You must be logged in to vote

What went wrong is that :* is being interpreted as a parameter, so I was getting superagent double callback bug errors.

If I just remove the colon, then MSW warnings for superagent requests to http://127.0.0.1 to random ports are properly removed.

const server = setupServer(
  // removed colon after the hostname
  http.all('http://127.0.0.1*', () => passthrough()),
)

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by silvenon
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant