Skip to content

Commit

Permalink
fix(README): Update axios example
Browse files Browse the repository at this point in the history
This was added with nock#1711 but [has changed with axios v1](axios/axios#5277)
  • Loading branch information
depoulo committed Apr 17, 2023
1 parent 7d22513 commit c35b0aa
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions README.md
Expand Up @@ -1539,9 +1539,8 @@ import test from 'ava' // You can use any test framework.
// can't be intercepted by nock. So, configure axios to use the node adapter.
//
// References:
// https://github.com/nock/nock/issues/699#issuecomment-272708264
// https://github.com/axios/axios/issues/305
axios.defaults.adapter = require('axios/lib/adapters/http')
// https://github.com/axios/axios/pull/5277
axios.defaults.adapter = 'http'

test('can fetch test response', async t => {
// Set up the mock request.
Expand Down

0 comments on commit c35b0aa

Please sign in to comment.