Skip to content

Commit 17d7272

Browse files
committed
Merge pull request #2702 from rackt/1.0.3-maybe
Switch back to a caret range for history
2 parents 2153e2c + 6d5fdef commit 17d7272

File tree

4 files changed

+11
-4
lines changed

4 files changed

+11
-4
lines changed

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@ after_success:
1111
branches:
1212
only:
1313
- master
14+
- 1.0.x

modules/__tests__/Link-test.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -289,15 +289,21 @@ describe('A <Link>', function () {
289289
}
290290

291291
const history = createHistory('/')
292-
const spy = spyOn(history, 'pushState').andCallThrough()
292+
const spy = spyOn(history, 'push').andCallThrough()
293293

294294
const steps = [
295295
function () {
296296
click(node.querySelector('a'), { button: 0 })
297297
},
298298
function () {
299299
expect(node.innerHTML).toMatch(/Hello/)
300-
expect(spy).toHaveBeenCalledWith({ you: 'doing?' }, { pathname: '/hello', search: '?how=are', hash: '#world' })
300+
expect(spy).toHaveBeenCalled()
301+
302+
const { location } = this.state
303+
expect(location.pathname).toEqual('/hello')
304+
expect(location.search).toEqual('?how=are')
305+
expect(location.hash).toEqual('#world')
306+
expect(location.state).toEqual({ you: 'doing?' })
301307
}
302308
]
303309

modules/__tests__/isActive-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,7 @@ describe('isActive', function () {
390390
describe('with query that does match', function () {
391391
it('is active', function (done) {
392392
render((
393-
<Router history={createHistory('/home?foo[]=bar&foo[]=bar1&foo[]=bar2')}>
393+
<Router history={createHistory('/home?foo=bar&foo=bar1&foo=bar2')}>
394394
<Route path="/" />
395395
<Route path="/home" />
396396
</Router>

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
"warning": "^2.0.0"
4242
},
4343
"peerDependencies": {
44-
"history": "1.13.x"
44+
"history": "^1.16.0"
4545
},
4646
"devDependencies": {
4747
"babel": "^5.4.7",

0 commit comments

Comments
 (0)