Skip to content

Commit 6171bd3

Browse files
committed
Fix 'should not attempt to set state after unmounting'
One render now equals to one map state call Wonder why this test tracks mapState calls...
1 parent fa70246 commit 6171bd3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/components/connect.spec.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -691,12 +691,12 @@ describe('React', () => {
691691
div
692692
);
693693

694-
expect(mapStateToPropsCalls).toBe(2);
694+
expect(mapStateToPropsCalls).toBe(1);
695695
const spy = expect.spyOn(console, 'error');
696696
store.dispatch({ type: 'APPEND', body: 'a'});
697697
spy.destroy();
698698
expect(spy.calls.length).toBe(0);
699-
expect(mapStateToPropsCalls).toBe(2);
699+
expect(mapStateToPropsCalls).toBe(1);
700700
});
701701

702702
it('should shallowly compare the selected state to prevent unnecessary updates', () => {

0 commit comments

Comments
 (0)