mdasberg / ng-apimock

Node plugin that provides the ability to use scenario based api mocking: for local development for protractor testing
MIT License
99 stars 26 forks source link

decode requestUrl before matching it against the expression #33

Closed stefanlemmen closed 6 years ago

stefanlemmen commented 6 years ago

When using ng-apimock in different browsers like Chrome and IE11 in my case, the requestUrl can be different between browsers. In my opinion the expression should match the decoded url for consistency. For instance when using single quotes in urls.

/search/query='val'
/search/query=%27val%27

In the current setup this leads to complex regular expression strings like this \/search\/query=(%27|\')[a-zA-Z0-9]*(%27|\')