axios-mock-adapter icon indicating copy to clipboard operation
axios-mock-adapter copied to clipboard

axios instance is not mocked

Open syffs opened this issue 3 years ago • 0 comments

Versions:

  • NodeJS: 16.13.0
  • axios: 0.26.1
  • axios-mock-adapter: 1.20.0
  • Typescript: 4.6.3
  • system: WSL Ubuntu 18.04

As in title, here is a repro with axios test. Just clone, then yarn install && yarn build && yarn test. Using onNoMatch: "throwException" has no effect.

is there a way to somehow mock axios globally (for every instance) ?

syffs avatar Apr 09 '22 00:04 syffs