We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 3d985bf + 6f5173c commit 06190b1Copy full SHA for 06190b1
modules/__tests__/isActive-test.js
@@ -80,6 +80,20 @@ describe('isActive', function () {
80
})
81
82
83
+
84
+ describe('with params', function () {
85
+ it('is active when its params match', function (done) {
86
+ render((
87
+ <Router history={createHistory('/hello/ryan')}>
88
+ <Route path="/hello/:name" />
89
+ </Router>
90
+ ), node, function () {
91
+ expect(this.router.isActive('/hello/ryan')).toBe(true)
92
+ expect(this.router.isActive('/hello/michael')).toBe(false)
93
+ done()
94
+ })
95
96
97
98
99
describe('nested routes', function () {
0 commit comments