ctimmerm / axios-mock-adapter

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

Fix regex in example #321

Closed cincodenada closed 2 years ago

cincodenada commented 3 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 3 years ago

Thanks!