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

fix(ngApimockHandler): match expression on decoded url (#33) #34

Closed stefanlemmen closed 6 years ago

stefanlemmen commented 6 years ago

By decoding the requestUrl before matching it against the configured expression, it will be matched consistently across different platforms/browsers. (also see #33)

stefanlemmen commented 6 years ago

Running npm run verify locally isn't giving the same result as npm run-script verify on Travis. Changing the verify script in the package.json to: node node_modules/tslint/bin/tslint -e '**/node_modules/**' **/*.ts --type-check -p tsconfig.json got me the same result as on the build server.

But I'm not sure how to fix the following typescript errors:

Error at lib/ngApimockHandler.ts:213:50: Property 'callback' does not exist on type 'string | ParsedUrlQuery'.
  Property 'callback' does not exist on type 'string'.
Error at lib/ngApimockHandler.ts:216:32: Property 'callback' does not exist on type 'string | ParsedUrlQuery'.
  Property 'callback' does not exist on type 'string'.
wswebcreation commented 6 years ago

Hi @stefanlemmen Tnx for the PR, it looks good, @mdasberg , what do you say?

mdasberg commented 6 years ago

thanks :)

stefanlemmen commented 6 years ago

you're welcome 👍

stefanlemmen commented 6 years ago

Any idea when this fix will be released @mdasberg?

mdasberg commented 6 years ago

I will release it tonight

On 12 Dec 2017, 10:48 +0100, Stefan Lemmen notifications@github.com, wrote:

Any idea when this fix will be released @mdasberg? — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.