When a query strings question mark ( ? ) is present in one path, it must be escaped according to the path-to-regexp documentation if it is not used to define an optional parameter.
When using paths that contain query strings, you need to escape the question mark (?) to ensure it does not flag the parameter as optional.
Edit: Update regex with /\?(\w+=)/g instead of /\?/g to insure that the '?' is used for a query string
Coverage increased (+0.004%) to 89.395% when pulling 4b2161a4efb061a2c8941274b53465f459d611a7 on Pierre-HenriLemp:fix/question_mark_fix into e6913470a42bfeddb1aa0911d7802de4363bd6b9 on slanatech:master.
When a query strings question mark ( ? ) is present in one path, it must be escaped according to the path-to-regexp documentation if it is not used to define an optional parameter.
When using paths that contain query strings, you need to escape the question mark (?) to ensure it does not flag the parameter as optional.
Edit: Update regex with
/\?(\w+=)/g
instead of/\?/g
to insure that the '?' is used for a query string