Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
alexreardon committed May 17, 2018
1 parent 1f3812b commit d6adc0e
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/state/middleware/auto-scroll.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export default (store: Store) => {
}, store.dispatch),
scrollWindow,
});

return (next: (Action) => mixed) => (action: Action): mixed => {
// Need to cancel any pending auto scrolling when drag is ending
if (isDragEnding(action)) {
Expand Down
25 changes: 25 additions & 0 deletions test/unit/state/middleware/dimension-marshal-stopper.spec.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// @flow
import middleware from '../../../../src/state/middleware/dimension-marshal-stopper';

it('should stop a collection if a drag is aborted', () => {
const mock = jest.fn();
const getMarshal = () => ({
stopPublishing: mock,
});

const store: Store = createStore(
middleware(getMarshal),
);
});

it('should stop a collection if a drag is dropped', () => {

});

it('should stop a collection if a drop is pending', () => {

});

it('should stop a collection if a drop does not need to animate and moves straight to complete', () => {

});

0 comments on commit d6adc0e

Please sign in to comment.