ctimmerm / axios-mock-adapter

Axios adapter that allows to easily mock requests
MIT License
3.44k stars 241 forks source link

Fix regex in example #321

Closed cincodenada closed 2 years ago

cincodenada commented 2 years ago

I'm surprised the existing regex even compiles but it looks like it does, and I guess it is technically a legal regex, it just will never match anything, because it requires the beginning of a string (or line) to come after a forward slash.

I'm assuming the intent was to match /api at the beginning of the path, so I've adjusted it accordingly.

ctimmerm commented 2 years ago

Thanks!