Skip to content

Commit e7c6f3d

Browse files
committed
Add tests for query and state props on Links.
1 parent 42891a2 commit e7c6f3d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

modules/__tests__/Link-test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ describe('A <Link>', function () {
289289
// just here to make sure click handlers don't prevent it from happening
290290
}
291291
render() {
292-
return <Link to="/hello" hash="#world" onClick={(e) => this.handleClick(e)}>Link</Link>
292+
return <Link to="/hello" hash="#world" query={{ how: 'are' }} state={{ you: 'doing?' }} onClick={(e) => this.handleClick(e)}>Link</Link>
293293
}
294294
}
295295

@@ -302,7 +302,7 @@ describe('A <Link>', function () {
302302
},
303303
function () {
304304
expect(node.innerHTML).toMatch(/Hello/)
305-
expect(spy).toHaveBeenCalledWith(undefined, '/hello#world')
305+
expect(spy).toHaveBeenCalledWith({ you: 'doing?' }, '/hello#world?how=are')
306306
}
307307
]
308308

0 commit comments

Comments
 (0)