You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
FAIL test.test.ts
test
✕ happy path (1364 ms)
● test › happy path
AxiosError: Request failed with status code 401
at settle (node_modules/axios/lib/core/settle.js:19:12)
at PassThrough.handleStreamEnd (node_modules/axios/lib/adapters/http.js:589:11)
actually - it's probably this line that is messing with the test ...
import { wrapper } from 'axios-cookiejar-support';
wrapper(axios);
i imagine that axios is not registering that when await jestPlayback.setup({ ... }) is enabled ?
reason i say that is i use a jar which authenticates the requests -- if a jar is not passed in, the server rejects with a 401. so it must be something about jest-playback (more likely @mswjs/interceptors) internals that is not working with axios-cookiejar-support ?
skilbjo
changed the title
Working with axios ?
Working with axios-cookiejar-support ?
Jan 21, 2024
I'm not able to get this working to 1) record requests and 2) play them back.
the test works perfectly fine if i comment out the
await jestPlayback.setup({ ... })
line.src.ts
test.ts
when i run the test in jest,
node --experimental-vm-modules node_modules/.bin/jest test.ts
test.ts.snap
The text was updated successfully, but these errors were encountered: