Skip to content

Commit

Permalink
test: fix usage of routerTestHelper back action (#8844)
Browse files Browse the repository at this point in the history
Found this case were the key gets set to `{ key: null }` instead of just being `null`. Should I just call `back()` at this point? Because I don't think there is a difference between a `null` vs `undefined` key
  • Loading branch information
oltrep committed Sep 25, 2020
1 parent 162e225 commit 20e2625
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/core/src/routers/__tests__/SwitchRouter.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ describe('SwitchRouter', () => {
expect(getSubState(1).routeName).toEqual('A');

// The back action should not switch to B. It should stay on A
back({ key: null });
back(null);
expect(getSubState(1).routeName).toEqual('A');
});

Expand Down

0 comments on commit 20e2625

Please sign in to comment.