ctimmerm / axios-mock-adapter

Axios adapter that allows to easily mock requests
MIT License
3.47k stars 245 forks source link

doc: Use AxiosMockAdapter throughout README #385

Closed exoego closed 3 months ago

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

works too, but AxiosMockAdapter is a preferred term.

exoego commented 3 months ago

@marcbachmann Could you take a look?

marcbachmann commented 3 months ago

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

exoego commented 3 months ago

Hmm, but

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

// don't
import AxiosMockAdapter from 'axios-mock-adapter'
exoego commented 3 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 3 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 3 months ago

@marcbachmann I see. Fixed the PR.