diff options
| author | Phil Hughes <me@iamphill.com> | 2017-10-10 13:01:36 +0100 |
|---|---|---|
| committer | Phil Hughes <me@iamphill.com> | 2017-10-13 11:38:11 +0100 |
| commit | def8b913fff2e0979abb1b3de93a97d00f88e806 (patch) | |
| tree | 9bb731f76143dd11036520cfddc0d580234ef0b2 /spec | |
| parent | 299da4ca075160ea5778b10f2a93b87f65517a76 (diff) | |
| download | gitlab-ce-ph-shortcut-js-modules.tar.gz | |
spec fixesph-shortcut-js-modules
Diffstat (limited to 'spec')
| -rw-r--r-- | spec/javascripts/shortcuts_spec.js | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/spec/javascripts/shortcuts_spec.js b/spec/javascripts/shortcuts_spec.js index 87f6c137f63..a2a609edef9 100644 --- a/spec/javascripts/shortcuts_spec.js +++ b/spec/javascripts/shortcuts_spec.js @@ -9,19 +9,17 @@ describe('Shortcuts', () => { preloadFixtures(fixtureName); describe('toggleMarkdownPreview', () => { - let sc; - beforeEach(() => { loadFixtures(fixtureName); spyOnEvent('.js-new-note-form .js-md-preview-button', 'focus'); spyOnEvent('.edit-note .js-md-preview-button', 'focus'); - sc = new Shortcuts(); + new Shortcuts(); // eslint-disable-line no-new }); it('focuses preview button in form', () => { - sc.toggleMarkdownPreview( + Shortcuts.toggleMarkdownPreview( createEvent('KeyboardEvent', document.querySelector('.js-new-note-form .js-note-text'), )); @@ -32,7 +30,7 @@ describe('Shortcuts', () => { document.querySelector('.js-note-edit').click(); setTimeout(() => { - sc.toggleMarkdownPreview( + Shortcuts.toggleMarkdownPreview( createEvent('KeyboardEvent', document.querySelector('.edit-note .js-note-text'), )); |
