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(rest): only return matched trie nodes with values #2375

Merged
merged 1 commit into from
Feb 12, 2019

Conversation

raymondfeng
Copy link
Contributor

@raymondfeng raymondfeng commented Feb 12, 2019

Fixes #2188

This is a spin-off from #2355.

Checklist

  • npm test passes on your machine
  • New tests added or existing tests modified to cover all changes
  • Code conforms with the style guide
  • API Documentation in code was updated
  • Documentation in /docs/site was updated
  • Affected artifact templates in packages/cli were updated
  • Affected example projects in examples/* were updated

Copy link
Member

@bajtos bajtos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👏

@@ -214,6 +214,44 @@ function runTestsWithRouter(router: RestRouter) {
expect(route.pathParams).to.containEql({userId: '1', format: 'json'});
});

it('finds "GET /orders/ and GET /orders/{id}" endpoints', () => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
it('finds "GET /orders/ and GET /orders/{id}" endpoints', () => {
it('finds "GET /orders and GET /orders/{id}" endpoints', () => {

The test names should match the code.

async findOrders(): Promise<object[]> {
return [];
}
// A path overlaps with `/order/{id}`. Please note a different var name
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// A path overlaps with `/order/{id}`. Please note a different var name
// A path overlaps with `/orders/{id}`. Please note a different var name

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nitpick: A path overlaps -> A path that overlaps

async findOrders(): Promise<object[]> {
return [];
}
// A path overlaps with `/order/{id}`. Please note a different var name
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nitpick: A path overlaps -> A path that overlaps

@raymondfeng raymondfeng merged commit 669ede1 into master Feb 12, 2019
@raymondfeng raymondfeng deleted the fix-trie-router branch February 12, 2019 17:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants