Skip to content

Network error with Axios in Jest tests with MSW 2.x #1915

Answered by ptsiakos77
chawax asked this question in Q&A
Discussion options

You must be logged in to vote

I had the same error with axios msw2 and jest and it was solved by using the jest config of @agnesmeri-olio but downgrading undici to v5 from v6
"undici": "^5.0.0",

Replies: 16 comments 15 replies

Comment options

You must be logged in to vote
1 reply
@chawax
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@agnesmeri-olio
Comment options

@agnesmeri-olio
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
9 replies
@chawax
Comment options

@ptsiakos77
Comment options

@iudin
Comment options

@chawax
Comment options

@GabrielBursi
Comment options

Answer selected by chawax
Comment options

You must be logged in to vote
2 replies
@ptsiakos77
Comment options

@piyushchauhan2011
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@eteterra-formus
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

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