Skip to content

Conversation

@TylorS
Copy link
Collaborator

@TylorS TylorS commented May 9, 2016

Using the /$ syntax, explicitly opt-out of partial matching.
Useful for having a / route and not having all paths match
against it.

TylorS added 2 commits May 8, 2016 20:01
Using the `/$` syntax, explicitly opt-out of partial matching.
Useful for having a `/` route and not having all paths match
against it.
@TylorS
Copy link
Collaborator Author

TylorS commented May 9, 2016

Fix for #16

expect(path).to.be.equal('/1736');
expect(value).to.be.equal('id is 1736');
});

Copy link

@Cmdv Cmdv May 9, 2016

Choose a reason for hiding this comment

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

you could also add bellow as that was where the user found the issue:
edit adding bellow test makes it fail returns not found route 😞

it('should match routes explicitly using `$`', () => {
    const {path, value} = switchPath('/', {
      '/$': 123,
      '/other/$': 456,
      '*': 'not found route'
    })

    expect(path).to.be.equal('/');
    expect(value).to.be.equal(123);
  })

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.

2 participants