Skip to content

Commit

Permalink
update adapter for axios
Browse files Browse the repository at this point in the history
  • Loading branch information
tjheffner committed Oct 19, 2023
1 parent 8b062fe commit 53906a5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ const customJestConfig = {
'^@/pages/(.*)$': '<rootDir>/src/pages/$1',
'^@/templates/(.*)$': '<rootDir>/src/templates/$1',
'^@/types/(.*)$': '<rootDir>/src/types/$1',
'^axios$': require.resolve('axios'),
},

testEnvironment: 'jest-environment-jsdom',
Expand Down
2 changes: 1 addition & 1 deletion src/lib/drupal/getGlobalElements.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import axios from 'axios'
import nock from 'nock'

axios.defaults.adapter = require('axios/lib/adapters/http')
axios.defaults.adapter = 'http'

const getData = async () => {
const res = await axios.get('http://localhost:3000/api/')
Expand Down

0 comments on commit 53906a5

Please sign in to comment.