Skip to content

Commit

Permalink
yummy test
Browse files Browse the repository at this point in the history
  • Loading branch information
alexreardon committed May 15, 2018
1 parent bac8217 commit 2d7ecc1
Show file tree
Hide file tree
Showing 2 changed files with 314 additions and 21 deletions.
16 changes: 7 additions & 9 deletions src/state/reducer.js
Original file line number Diff line number Diff line change
Expand Up @@ -216,14 +216,10 @@ export default (state: State = idle, action: Action): State => {

if (action.type === 'BULK_REPLACE') {
// Unexpected bulk publish
invariant(state.phase === 'BULK_COLLECTING' || state.phase === 'DROP_PENDING',
`Unexpected bulk publish received in phase ${state.phase}`);

// A drop is waiting on a bulk publish to finish
// The pending drop will be handled by the dropMiddleware
// if (state.phase === 'DROP_PENDING') {
// return state;
// }
invariant(
state.phase === 'BULK_COLLECTING' || state.phase === 'DROP_PENDING',
`Unexpected bulk publish received in phase ${state.phase}`
);

const existing: BulkCollectionState | DropPendingState = state;

Expand Down Expand Up @@ -291,7 +287,9 @@ export default (state: State = idle, action: Action): State => {
};
}

// There was a pending drop
// There was a DROP_PENDING
// Staying in the DROP_PENDING phase
// setting isWaiting for false
return {
// appeasing flow
phase: 'DROP_PENDING',
Expand Down
Loading

0 comments on commit 2d7ecc1

Please sign in to comment.