diff options
author | Robert Speicher <rspeicher@gmail.com> | 2021-01-20 13:34:23 -0600 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2021-01-20 13:34:23 -0600 |
commit | 6438df3a1e0fb944485cebf07976160184697d72 (patch) | |
tree | 00b09bfd170e77ae9391b1a2f5a93ef6839f2597 /spec/frontend/ide/stores/plugins/terminal_sync_spec.js | |
parent | 42bcd54d971da7ef2854b896a7b34f4ef8601067 (diff) | |
download | gitlab-ce-6438df3a1e0fb944485cebf07976160184697d72.tar.gz |
Add latest changes from gitlab-org/gitlab@13-8-stable-eev13.8.0-rc42
Diffstat (limited to 'spec/frontend/ide/stores/plugins/terminal_sync_spec.js')
-rw-r--r-- | spec/frontend/ide/stores/plugins/terminal_sync_spec.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/frontend/ide/stores/plugins/terminal_sync_spec.js b/spec/frontend/ide/stores/plugins/terminal_sync_spec.js index 2aa3e770e7d..0e5f4184679 100644 --- a/spec/frontend/ide/stores/plugins/terminal_sync_spec.js +++ b/spec/frontend/ide/stores/plugins/terminal_sync_spec.js @@ -4,6 +4,7 @@ import { SET_SESSION_STATUS } from '~/ide/stores/modules/terminal/mutation_types import { RUNNING, STOPPING } from '~/ide/stores/modules/terminal/constants'; import { createStore } from '~/ide/stores'; import eventHub from '~/ide/eventhub'; +import { createTriggerUpdatePayload } from '../../helpers'; jest.mock('~/ide/lib/mirror'); @@ -51,6 +52,14 @@ describe('IDE stores/plugins/mirror', () => { expect(store.dispatch).toHaveBeenCalledWith(ACTION_UPLOAD); }); + it('does nothing when ide.files.change is emitted with "update"', () => { + eventHub.$emit(FILES_CHANGE_EVENT, createTriggerUpdatePayload('foo')); + + jest.runAllTimers(); + + expect(store.dispatch).not.toHaveBeenCalledWith(ACTION_UPLOAD); + }); + describe('when session stops', () => { beforeEach(() => { store.commit(`terminal/${SET_SESSION_STATUS}`, STOPPING); |