Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix optional parameters #27

Merged
merged 2 commits into from Apr 27, 2016
Merged

Fix optional parameters #27

merged 2 commits into from Apr 27, 2016

Conversation

@sanches89
Copy link
Contributor

sanches89 commented Apr 25, 2016

Fix the optional parameters defined in Path-to-RegExp.

Ivan C. Sanches
expect(result).to.be.ok;
expect(result).to.have.property('path', '/1');
expect(result).to.have.property('keys').and.be.an('array').lengthOf(2);
expect(result).to.have.property('params').and.be.deep.equal({ a: '1' });

This comment has been minimized.

Copy link
@koistya

koistya Apr 25, 2016

Member

Just to double-check.. it should be { a: '1' } and not { a: '1', b: undefined }?

This comment has been minimized.

Copy link
@sanches89

sanches89 Apr 25, 2016

Author Contributor

It's better { a: '1', b: undefined } to maintain the similarity with Path-to-RegExp.

Ivan C. Sanches
@koistya koistya merged commit 82cf037 into kriasoft:master Apr 27, 2016
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@koistya

This comment has been minimized.

Copy link
Member

koistya commented Apr 27, 2016

@sanchesic89 thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.