diff --git a/test/createTests.js b/test/createTests.js index 7884160..1464756 100644 --- a/test/createTests.js +++ b/test/createTests.js @@ -356,6 +356,19 @@ module.exports = function createTests(createHistory, name, reset = defaultReset) }) }) + it('does not update `history` if `avoidRouterUpdate`', () => { + const updates = [] + const historyUnsubscribe = history.listen(location => { + updates.push(location.pathname) + }) + + store.dispatch(pushPath('/foo', null, { avoidRouterUpdate: true })) + + expect(updates).toEqual([ '/' ]) + + historyUnsubscribe() + }); + it('updates the router even if path is the same', () => { const updates = [] const historyUnsubscribe = history.listen(location => {