mirror of
https://github.com/reduxjs/redux-devtools.git
synced 2025-01-31 19:54:35 +03:00
clarify comments
This commit is contained in:
parent
449b73f58f
commit
441ba0d14c
|
@ -323,7 +323,7 @@ describe('instrument', () => {
|
||||||
expect(liftedStoreState.committedState).toBe(undefined);
|
expect(liftedStoreState.committedState).toBe(undefined);
|
||||||
expect(liftedStoreState.stagedActionIds).toInclude(1);
|
expect(liftedStoreState.stagedActionIds).toInclude(1);
|
||||||
|
|
||||||
// Triggers auto-commit.
|
// Trigger auto-commit.
|
||||||
configuredStore.dispatch({ type: 'INCREMENT' });
|
configuredStore.dispatch({ type: 'INCREMENT' });
|
||||||
liftedStoreState = configuredLiftedStore.getState();
|
liftedStoreState = configuredLiftedStore.getState();
|
||||||
|
|
||||||
|
@ -372,11 +372,11 @@ describe('instrument', () => {
|
||||||
storeWithBug.dispatch({ type: 'DECREMENT' });
|
storeWithBug.dispatch({ type: 'DECREMENT' });
|
||||||
expect(liftedStoreWithBug.getState().stagedActionIds.length).toBe(7);
|
expect(liftedStoreWithBug.getState().stagedActionIds.length).toBe(7);
|
||||||
|
|
||||||
// should auto-commit only 2 non-error actions
|
// Auto-commit 2 actions by "fixing" reducer bug, but introducing another.
|
||||||
storeWithBug.replaceReducer(counterWithAnotherBug);
|
storeWithBug.replaceReducer(counterWithAnotherBug);
|
||||||
expect(liftedStoreWithBug.getState().stagedActionIds.length).toBe(5);
|
expect(liftedStoreWithBug.getState().stagedActionIds.length).toBe(5);
|
||||||
|
|
||||||
// should auto-commit down to 3 actions
|
// Auto-commit 2 more actions by "fixing" other reducer bug.
|
||||||
storeWithBug.replaceReducer(counter);
|
storeWithBug.replaceReducer(counter);
|
||||||
expect(liftedStoreWithBug.getState().stagedActionIds.length).toBe(3);
|
expect(liftedStoreWithBug.getState().stagedActionIds.length).toBe(3);
|
||||||
|
|
||||||
|
@ -392,7 +392,7 @@ describe('instrument', () => {
|
||||||
liftedStoreState = configuredLiftedStore.getState();
|
liftedStoreState = configuredLiftedStore.getState();
|
||||||
expect(liftedStoreState.currentStateIndex).toBe(2);
|
expect(liftedStoreState.currentStateIndex).toBe(2);
|
||||||
|
|
||||||
// currentStateIndex should stay at 2 as actions are committed
|
// currentStateIndex should stay at 2 as actions are committed.
|
||||||
configuredStore.dispatch({ type: 'INCREMENT' });
|
configuredStore.dispatch({ type: 'INCREMENT' });
|
||||||
liftedStoreState = configuredLiftedStore.getState();
|
liftedStoreState = configuredLiftedStore.getState();
|
||||||
currentComputedState = liftedStoreState.computedStates[liftedStoreState.currentStateIndex];
|
currentComputedState = liftedStoreState.computedStates[liftedStoreState.currentStateIndex];
|
||||||
|
|
Loading…
Reference in New Issue
Block a user