diff options
Diffstat (limited to 'spec/frontend/behaviors/shortcuts/shortcuts_issuable_spec.js')
-rw-r--r-- | spec/frontend/behaviors/shortcuts/shortcuts_issuable_spec.js | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/spec/frontend/behaviors/shortcuts/shortcuts_issuable_spec.js b/spec/frontend/behaviors/shortcuts/shortcuts_issuable_spec.js index 77dcc28dd48..94ba1615c89 100644 --- a/spec/frontend/behaviors/shortcuts/shortcuts_issuable_spec.js +++ b/spec/frontend/behaviors/shortcuts/shortcuts_issuable_spec.js @@ -15,7 +15,7 @@ describe('ShortcutsIssuable', () => { preloadFixtures(snippetShowFixtureName, mrShowFixtureName); - beforeAll(done => { + beforeAll((done) => { initCopyAsGFM(); // Fake call to nodeToGfm so the import of lazy bundle happened @@ -81,7 +81,7 @@ describe('ShortcutsIssuable', () => { stubSelection('<p>Selected text.</p>'); }); - it('leaves existing input intact', done => { + it('leaves existing input intact', (done) => { $(FORM_SELECTOR).val('This text was already here.'); expect($(FORM_SELECTOR).val()).toBe('This text was already here.'); @@ -96,7 +96,7 @@ describe('ShortcutsIssuable', () => { }); }); - it('triggers `input`', done => { + it('triggers `input`', (done) => { let triggered = false; $(FORM_SELECTOR).on('input', () => { triggered = true; @@ -110,7 +110,7 @@ describe('ShortcutsIssuable', () => { }); }); - it('triggers `focus`', done => { + it('triggers `focus`', (done) => { const spy = jest.spyOn(document.querySelector(FORM_SELECTOR), 'focus'); ShortcutsIssuable.replyWithSelectedText(true); @@ -122,7 +122,7 @@ describe('ShortcutsIssuable', () => { }); describe('with a one-line selection', () => { - it('quotes the selection', done => { + it('quotes the selection', (done) => { stubSelection('<p>This text has been selected.</p>'); ShortcutsIssuable.replyWithSelectedText(true); @@ -134,7 +134,7 @@ describe('ShortcutsIssuable', () => { }); describe('with a multi-line selection', () => { - it('quotes the selected lines as a group', done => { + it('quotes the selected lines as a group', (done) => { stubSelection( '<p>Selected line one.</p>\n<p>Selected line two.</p>\n<p>Selected line three.</p>', ); @@ -154,7 +154,7 @@ describe('ShortcutsIssuable', () => { stubSelection('<p>Selected text.</p>', true); }); - it('does not add anything to the input', done => { + it('does not add anything to the input', (done) => { ShortcutsIssuable.replyWithSelectedText(true); setImmediate(() => { @@ -163,7 +163,7 @@ describe('ShortcutsIssuable', () => { }); }); - it('triggers `focus`', done => { + it('triggers `focus`', (done) => { const spy = jest.spyOn(document.querySelector(FORM_SELECTOR), 'focus'); ShortcutsIssuable.replyWithSelectedText(true); @@ -179,7 +179,7 @@ describe('ShortcutsIssuable', () => { stubSelection('<div class="md">Selected text.</div><p>Invalid selected text.</p>', true); }); - it('only adds the valid part to the input', done => { + it('only adds the valid part to the input', (done) => { ShortcutsIssuable.replyWithSelectedText(true); setImmediate(() => { @@ -188,7 +188,7 @@ describe('ShortcutsIssuable', () => { }); }); - it('triggers `focus`', done => { + it('triggers `focus`', (done) => { const spy = jest.spyOn(document.querySelector(FORM_SELECTOR), 'focus'); ShortcutsIssuable.replyWithSelectedText(true); @@ -198,7 +198,7 @@ describe('ShortcutsIssuable', () => { }); }); - it('triggers `input`', done => { + it('triggers `input`', (done) => { let triggered = false; $(FORM_SELECTOR).on('input', () => { triggered = true; @@ -233,7 +233,7 @@ describe('ShortcutsIssuable', () => { }); }); - it('adds the quoted selection to the input', done => { + it('adds the quoted selection to the input', (done) => { ShortcutsIssuable.replyWithSelectedText(true); setImmediate(() => { @@ -242,7 +242,7 @@ describe('ShortcutsIssuable', () => { }); }); - it('triggers `focus`', done => { + it('triggers `focus`', (done) => { const spy = jest.spyOn(document.querySelector(FORM_SELECTOR), 'focus'); ShortcutsIssuable.replyWithSelectedText(true); @@ -252,7 +252,7 @@ describe('ShortcutsIssuable', () => { }); }); - it('triggers `input`', done => { + it('triggers `input`', (done) => { let triggered = false; $(FORM_SELECTOR).on('input', () => { triggered = true; @@ -287,7 +287,7 @@ describe('ShortcutsIssuable', () => { }); }); - it('does not add anything to the input', done => { + it('does not add anything to the input', (done) => { ShortcutsIssuable.replyWithSelectedText(true); setImmediate(() => { @@ -296,7 +296,7 @@ describe('ShortcutsIssuable', () => { }); }); - it('triggers `focus`', done => { + it('triggers `focus`', (done) => { const spy = jest.spyOn(document.querySelector(FORM_SELECTOR), 'focus'); ShortcutsIssuable.replyWithSelectedText(true); @@ -308,7 +308,7 @@ describe('ShortcutsIssuable', () => { }); describe('with a valid selection with no text content', () => { - it('returns the proper markdown', done => { + it('returns the proper markdown', (done) => { stubSelection('<img src="https://gitlab.com/logo.png" alt="logo" />'); ShortcutsIssuable.replyWithSelectedText(true); @@ -334,7 +334,7 @@ describe('ShortcutsIssuable', () => { '.sidebar-source-branch button', ); - [sidebarCollapsedBtn, sidebarExpandedBtn].forEach(btn => jest.spyOn(btn, 'click')); + [sidebarCollapsedBtn, sidebarExpandedBtn].forEach((btn) => jest.spyOn(btn, 'click')); }); afterEach(() => { |