Skip to content

Commit 7cccd3f

Browse files
committed
Add one more test case
1 parent c8c522f commit 7cccd3f

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

modules/__tests__/isActive-test.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,24 @@ describe('isActive', function () {
122122
})
123123
})
124124

125+
describe('a pathname that matches a nested absolute path', function () {
126+
describe('with no query', function () {
127+
it('is active', function (done) {
128+
render((
129+
<Router history={createHistory('/absolute')}>
130+
<Route path="/home">
131+
<Route path="/absolute" />
132+
</Route>
133+
</Router>
134+
), node, function () {
135+
expect(this.history.isActive('/absolute')).toBe(true)
136+
expect(this.history.isActive('/absolute', null, true)).toBe(true)
137+
done()
138+
})
139+
})
140+
})
141+
})
142+
125143
describe('a pathname that matches an index URL', function () {
126144
describe('with no query', function () {
127145
it('is active', function (done) {

0 commit comments

Comments
 (0)