ctimmerm / axios-mock-adapter

Axios adapter that allows to easily mock requests
MIT License
3.45k stars 244 forks source link

doc: Use AxiosMockAdapter throughout README #385

Closed exoego closed 2 months ago

exoego commented 4 months ago
import MockAdapter from 'axios-mock-adapter'

works too, but AxiosMockAdapter is a preferred term.

exoego commented 2 months ago

@marcbachmann Could you take a look?

marcbachmann commented 2 months ago

I'm not sure how this would fix anything. you need to import AxiosMockAdapter instead of MockAdapter

exoego commented 2 months ago

Hmm, but

// works
import MockAdapter from 'axios-mock-adapter'

// don't
import AxiosMockAdapter from 'axios-mock-adapter'
exoego commented 2 months ago

Ah sorry, AxiosMockAdapter works too.

In example of README, MockAdapter is used. So I thought AxiosMockAdapter was a wrong name, but both is fine. https://github.com/ctimmerm/axios-mock-adapter?tab=readme-ov-file#example

marcbachmann commented 2 months ago

If you change all MockAdapter occurences to AxiosMockAdapter in the Readme and remove the webpack config change, I could approve the change 😉

exoego commented 2 months ago

@marcbachmann I see. Fixed the PR.