diff options
Diffstat (limited to 'spec/frontend/ide/stores/modules/pane/actions_spec.js')
-rw-r--r-- | spec/frontend/ide/stores/modules/pane/actions_spec.js | 27 |
1 files changed, 12 insertions, 15 deletions
diff --git a/spec/frontend/ide/stores/modules/pane/actions_spec.js b/spec/frontend/ide/stores/modules/pane/actions_spec.js index 42fe8b400b8..98c4f22dac8 100644 --- a/spec/frontend/ide/stores/modules/pane/actions_spec.js +++ b/spec/frontend/ide/stores/modules/pane/actions_spec.js @@ -7,19 +7,19 @@ describe('IDE pane module actions', () => { const TEST_VIEW_KEEP_ALIVE = { name: 'test-keep-alive', keepAlive: true }; describe('toggleOpen', () => { - it('dispatches open if closed', (done) => { - testAction(actions.toggleOpen, TEST_VIEW, { isOpen: false }, [], [{ type: 'open' }], done); + it('dispatches open if closed', () => { + return testAction(actions.toggleOpen, TEST_VIEW, { isOpen: false }, [], [{ type: 'open' }]); }); - it('dispatches close if opened', (done) => { - testAction(actions.toggleOpen, TEST_VIEW, { isOpen: true }, [], [{ type: 'close' }], done); + it('dispatches close if opened', () => { + return testAction(actions.toggleOpen, TEST_VIEW, { isOpen: true }, [], [{ type: 'close' }]); }); }); describe('open', () => { describe('with a view specified', () => { - it('commits SET_OPEN and SET_CURRENT_VIEW', (done) => { - testAction( + it('commits SET_OPEN and SET_CURRENT_VIEW', () => { + return testAction( actions.open, TEST_VIEW, {}, @@ -28,12 +28,11 @@ describe('IDE pane module actions', () => { { type: types.SET_CURRENT_VIEW, payload: TEST_VIEW.name }, ], [], - done, ); }); - it('commits KEEP_ALIVE_VIEW if keepAlive is true', (done) => { - testAction( + it('commits KEEP_ALIVE_VIEW if keepAlive is true', () => { + return testAction( actions.open, TEST_VIEW_KEEP_ALIVE, {}, @@ -43,28 +42,26 @@ describe('IDE pane module actions', () => { { type: types.KEEP_ALIVE_VIEW, payload: TEST_VIEW_KEEP_ALIVE.name }, ], [], - done, ); }); }); describe('without a view specified', () => { - it('commits SET_OPEN', (done) => { - testAction( + it('commits SET_OPEN', () => { + return testAction( actions.open, undefined, {}, [{ type: types.SET_OPEN, payload: true }], [], - done, ); }); }); }); describe('close', () => { - it('commits SET_OPEN', (done) => { - testAction(actions.close, null, {}, [{ type: types.SET_OPEN, payload: false }], [], done); + it('commits SET_OPEN', () => { + return testAction(actions.close, null, {}, [{ type: types.SET_OPEN, payload: false }], []); }); }); }); |