Commit 95565a0b authored by Jacques Erasmus's avatar Jacques Erasmus

Merge branch '344247-replace-setimmediate-in-tests-6' into 'master'

Remove setImmediate usage in specs

See merge request gitlab-org/gitlab!80372
parents a4ec91a7 c1a738ba
...@@ -5,6 +5,7 @@ import { nextTick } from 'vue'; ...@@ -5,6 +5,7 @@ import { nextTick } from 'vue';
import EpicHeader from 'ee/epic/components/epic_header.vue'; import EpicHeader from 'ee/epic/components/epic_header.vue';
import { statusType } from 'ee/epic/constants'; import { statusType } from 'ee/epic/constants';
import createStore from 'ee/epic/store'; import createStore from 'ee/epic/store';
import waitForPromises from 'helpers/wait_for_promises';
import TimeagoTooltip from '~/vue_shared/components/time_ago_tooltip.vue'; import TimeagoTooltip from '~/vue_shared/components/time_ago_tooltip.vue';
import UserAvatarLink from '~/vue_shared/components/user_avatar/user_avatar_link.vue'; import UserAvatarLink from '~/vue_shared/components/user_avatar/user_avatar_link.vue';
...@@ -157,7 +158,7 @@ describe('EpicHeaderComponent', () => { ...@@ -157,7 +158,7 @@ describe('EpicHeaderComponent', () => {
store.state.author.isGitlabEmployee = true; store.state.author.isGitlabEmployee = true;
// Wait for dynamic imports to resolve // Wait for dynamic imports to resolve
await new Promise(setImmediate); await waitForPromises();
expect(wrapper.vm.$refs.gitlabTeamMemberBadge).not.toBeUndefined(); expect(wrapper.vm.$refs.gitlabTeamMemberBadge).not.toBeUndefined();
}); });
......
import { shallowMount } from '@vue/test-utils'; import { shallowMount } from '@vue/test-utils';
import Vue from 'vue'; import Vue from 'vue';
import Vuex from 'vuex'; import Vuex from 'vuex';
import waitForPromises from 'helpers/wait_for_promises';
import GitlabTeamMemberBadge from 'ee/vue_shared/components/user_avatar/badges/gitlab_team_member_badge.vue'; import GitlabTeamMemberBadge from 'ee/vue_shared/components/user_avatar/badges/gitlab_team_member_badge.vue';
import NoteHeader from '~/notes/components/note_header.vue'; import NoteHeader from '~/notes/components/note_header.vue';
...@@ -37,13 +38,13 @@ describe('NoteHeader component', () => { ...@@ -37,13 +38,13 @@ describe('NoteHeader component', () => {
${{ author }} | ${false} | ${"doesn't render"} | ${'undefined'} ${{ author }} | ${false} | ${"doesn't render"} | ${'undefined'}
`( `(
'$message1 GitLab team member badge when `is_gitlab_employee` is $message2', '$message1 GitLab team member badge when `is_gitlab_employee` is $message2',
({ props, expected }) => { async ({ props, expected }) => {
createComponent(props); createComponent(props);
// Wait for dynamic imports to resolve // Wait for dynamic imports to resolve
return new Promise(setImmediate).then(() => { await waitForPromises();
expect(wrapper.findComponent(GitlabTeamMemberBadge).exists()).toBe(expected); expect(wrapper.findComponent(GitlabTeamMemberBadge).exists()).toBe(expected);
});
}, },
); );
}); });
import waitForPromises from 'helpers/wait_for_promises';
import initCopyAsGFM, { CopyAsGFM } from '~/behaviors/markdown/copy_as_gfm'; import initCopyAsGFM, { CopyAsGFM } from '~/behaviors/markdown/copy_as_gfm';
describe('CopyAsGFM', () => { describe('CopyAsGFM', () => {
...@@ -81,49 +82,40 @@ describe('CopyAsGFM', () => { ...@@ -81,49 +82,40 @@ describe('CopyAsGFM', () => {
stopPropagation() {}, stopPropagation() {},
}; };
CopyAsGFM.copyAsGFM(e, CopyAsGFM.transformGFMSelection); CopyAsGFM.copyAsGFM(e, CopyAsGFM.transformGFMSelection);
return clipboardData;
return waitForPromises();
}; };
beforeAll((done) => { beforeAll(() => {
initCopyAsGFM(); initCopyAsGFM();
// Fake call to nodeToGfm so the import of lazy bundle happened // Fake call to nodeToGfm so the import of lazy bundle happened
CopyAsGFM.nodeToGFM(document.createElement('div')) return CopyAsGFM.nodeToGFM(document.createElement('div'));
.then(() => {
done();
})
.catch(done.fail);
}); });
beforeEach(() => jest.spyOn(clipboardData, 'setData')); beforeEach(() => jest.spyOn(clipboardData, 'setData'));
describe('list handling', () => { describe('list handling', () => {
it('uses correct gfm for unordered lists', (done) => { it('uses correct gfm for unordered lists', async () => {
const selection = stubSelection('<li>List Item1</li><li>List Item2</li>\n', 'UL'); const selection = stubSelection('<li>List Item1</li><li>List Item2</li>\n', 'UL');
window.getSelection = jest.fn(() => selection); window.getSelection = jest.fn(() => selection);
simulateCopy(); await simulateCopy();
setImmediate(() => {
const expectedGFM = '* List Item1\n* List Item2'; const expectedGFM = '* List Item1\n* List Item2';
expect(clipboardData.setData).toHaveBeenCalledWith('text/x-gfm', expectedGFM); expect(clipboardData.setData).toHaveBeenCalledWith('text/x-gfm', expectedGFM);
done();
});
}); });
it('uses correct gfm for ordered lists', (done) => { it('uses correct gfm for ordered lists', async () => {
const selection = stubSelection('<li>List Item1</li><li>List Item2</li>\n', 'OL'); const selection = stubSelection('<li>List Item1</li><li>List Item2</li>\n', 'OL');
window.getSelection = jest.fn(() => selection); window.getSelection = jest.fn(() => selection);
simulateCopy(); await simulateCopy();
setImmediate(() => {
const expectedGFM = '1. List Item1\n1. List Item2'; const expectedGFM = '1. List Item1\n1. List Item2';
expect(clipboardData.setData).toHaveBeenCalledWith('text/x-gfm', expectedGFM); expect(clipboardData.setData).toHaveBeenCalledWith('text/x-gfm', expectedGFM);
done();
});
}); });
}); });
}); });
...@@ -131,10 +123,9 @@ describe('CopyAsGFM', () => { ...@@ -131,10 +123,9 @@ describe('CopyAsGFM', () => {
describe('CopyAsGFM.quoted', () => { describe('CopyAsGFM.quoted', () => {
const sampleGFM = '* List 1\n* List 2\n\n`Some code`'; const sampleGFM = '* List 1\n* List 2\n\n`Some code`';
it('adds quote char `> ` to each line', (done) => { it('adds quote char `> ` to each line', () => {
const expectedQuotedGFM = '> * List 1\n> * List 2\n> \n> `Some code`'; const expectedQuotedGFM = '> * List 1\n> * List 2\n> \n> `Some code`';
expect(CopyAsGFM.quoted(sampleGFM)).toEqual(expectedQuotedGFM); expect(CopyAsGFM.quoted(sampleGFM)).toEqual(expectedQuotedGFM);
done();
}); });
}); });
}); });
import $ from 'jquery'; import $ from 'jquery';
import Mousetrap from 'mousetrap'; import Mousetrap from 'mousetrap';
import waitForPromises from 'helpers/wait_for_promises';
import initCopyAsGFM, { CopyAsGFM } from '~/behaviors/markdown/copy_as_gfm'; import initCopyAsGFM, { CopyAsGFM } from '~/behaviors/markdown/copy_as_gfm';
import ShortcutsIssuable from '~/behaviors/shortcuts/shortcuts_issuable'; import ShortcutsIssuable from '~/behaviors/shortcuts/shortcuts_issuable';
import { getSelectedFragment } from '~/lib/utils/common_utils'; import { getSelectedFragment } from '~/lib/utils/common_utils';
...@@ -13,15 +14,11 @@ describe('ShortcutsIssuable', () => { ...@@ -13,15 +14,11 @@ describe('ShortcutsIssuable', () => {
const snippetShowFixtureName = 'snippets/show.html'; const snippetShowFixtureName = 'snippets/show.html';
const mrShowFixtureName = 'merge_requests/merge_request_of_current_user.html'; const mrShowFixtureName = 'merge_requests/merge_request_of_current_user.html';
beforeAll((done) => { beforeAll(() => {
initCopyAsGFM(); initCopyAsGFM();
// Fake call to nodeToGfm so the import of lazy bundle happened // Fake call to nodeToGfm so the import of lazy bundle happened
CopyAsGFM.nodeToGFM(document.createElement('div')) return CopyAsGFM.nodeToGFM(document.createElement('div'));
.then(() => {
done();
})
.catch(done.fail);
}); });
describe('replyWithSelectedText', () => { describe('replyWithSelectedText', () => {
...@@ -79,22 +76,18 @@ describe('ShortcutsIssuable', () => { ...@@ -79,22 +76,18 @@ describe('ShortcutsIssuable', () => {
stubSelection('<p>Selected text.</p>'); stubSelection('<p>Selected text.</p>');
}); });
it('leaves existing input intact', (done) => { it('leaves existing input intact', async () => {
$(FORM_SELECTOR).val('This text was already here.'); $(FORM_SELECTOR).val('This text was already here.');
expect($(FORM_SELECTOR).val()).toBe('This text was already here.'); expect($(FORM_SELECTOR).val()).toBe('This text was already here.');
ShortcutsIssuable.replyWithSelectedText(true); ShortcutsIssuable.replyWithSelectedText(true);
setImmediate(() => { await waitForPromises();
expect($(FORM_SELECTOR).val()).toBe( expect($(FORM_SELECTOR).val()).toBe('This text was already here.\n\n> Selected text.\n\n');
'This text was already here.\n\n> Selected text.\n\n',
);
done();
});
}); });
it('triggers `input`', (done) => { it('triggers `input`', async () => {
let triggered = false; let triggered = false;
$(FORM_SELECTOR).on('input', () => { $(FORM_SELECTOR).on('input', () => {
triggered = true; triggered = true;
...@@ -102,48 +95,40 @@ describe('ShortcutsIssuable', () => { ...@@ -102,48 +95,40 @@ describe('ShortcutsIssuable', () => {
ShortcutsIssuable.replyWithSelectedText(true); ShortcutsIssuable.replyWithSelectedText(true);
setImmediate(() => { await waitForPromises();
expect(triggered).toBe(true); expect(triggered).toBe(true);
done();
});
}); });
it('triggers `focus`', (done) => { it('triggers `focus`', async () => {
const spy = jest.spyOn(document.querySelector(FORM_SELECTOR), 'focus'); const spy = jest.spyOn(document.querySelector(FORM_SELECTOR), 'focus');
ShortcutsIssuable.replyWithSelectedText(true); ShortcutsIssuable.replyWithSelectedText(true);
setImmediate(() => { await waitForPromises();
expect(spy).toHaveBeenCalled(); expect(spy).toHaveBeenCalled();
done();
});
}); });
}); });
describe('with a one-line selection', () => { describe('with a one-line selection', () => {
it('quotes the selection', (done) => { it('quotes the selection', async () => {
stubSelection('<p>This text has been selected.</p>'); stubSelection('<p>This text has been selected.</p>');
ShortcutsIssuable.replyWithSelectedText(true); ShortcutsIssuable.replyWithSelectedText(true);
setImmediate(() => { await waitForPromises();
expect($(FORM_SELECTOR).val()).toBe('> This text has been selected.\n\n'); expect($(FORM_SELECTOR).val()).toBe('> This text has been selected.\n\n');
done();
});
}); });
}); });
describe('with a multi-line selection', () => { describe('with a multi-line selection', () => {
it('quotes the selected lines as a group', (done) => { it('quotes the selected lines as a group', async () => {
stubSelection( stubSelection(
'<p>Selected line one.</p>\n<p>Selected line two.</p>\n<p>Selected line three.</p>', '<p>Selected line one.</p>\n<p>Selected line two.</p>\n<p>Selected line three.</p>',
); );
ShortcutsIssuable.replyWithSelectedText(true); ShortcutsIssuable.replyWithSelectedText(true);
setImmediate(() => { await waitForPromises();
expect($(FORM_SELECTOR).val()).toBe( expect($(FORM_SELECTOR).val()).toBe(
'> Selected line one.\n>\n> Selected line two.\n>\n> Selected line three.\n\n', '> Selected line one.\n>\n> Selected line two.\n>\n> Selected line three.\n\n',
); );
done();
});
}); });
}); });
...@@ -152,23 +137,19 @@ describe('ShortcutsIssuable', () => { ...@@ -152,23 +137,19 @@ describe('ShortcutsIssuable', () => {
stubSelection('<p>Selected text.</p>', true); stubSelection('<p>Selected text.</p>', true);
}); });
it('does not add anything to the input', (done) => { it('does not add anything to the input', async () => {
ShortcutsIssuable.replyWithSelectedText(true); ShortcutsIssuable.replyWithSelectedText(true);
setImmediate(() => { await waitForPromises();
expect($(FORM_SELECTOR).val()).toBe(''); expect($(FORM_SELECTOR).val()).toBe('');
done();
});
}); });
it('triggers `focus`', (done) => { it('triggers `focus`', async () => {
const spy = jest.spyOn(document.querySelector(FORM_SELECTOR), 'focus'); const spy = jest.spyOn(document.querySelector(FORM_SELECTOR), 'focus');
ShortcutsIssuable.replyWithSelectedText(true); ShortcutsIssuable.replyWithSelectedText(true);
setImmediate(() => { await waitForPromises();
expect(spy).toHaveBeenCalled(); expect(spy).toHaveBeenCalled();
done();
});
}); });
}); });
...@@ -177,26 +158,22 @@ describe('ShortcutsIssuable', () => { ...@@ -177,26 +158,22 @@ describe('ShortcutsIssuable', () => {
stubSelection('<div class="md">Selected text.</div><p>Invalid selected text.</p>', true); 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', async () => {
ShortcutsIssuable.replyWithSelectedText(true); ShortcutsIssuable.replyWithSelectedText(true);
setImmediate(() => { await waitForPromises();
expect($(FORM_SELECTOR).val()).toBe('> Selected text.\n\n'); expect($(FORM_SELECTOR).val()).toBe('> Selected text.\n\n');
done();
});
}); });
it('triggers `focus`', (done) => { it('triggers `focus`', async () => {
const spy = jest.spyOn(document.querySelector(FORM_SELECTOR), 'focus'); const spy = jest.spyOn(document.querySelector(FORM_SELECTOR), 'focus');
ShortcutsIssuable.replyWithSelectedText(true); ShortcutsIssuable.replyWithSelectedText(true);
setImmediate(() => { await waitForPromises();
expect(spy).toHaveBeenCalled(); expect(spy).toHaveBeenCalled();
done();
});
}); });
it('triggers `input`', (done) => { it('triggers `input`', async () => {
let triggered = false; let triggered = false;
$(FORM_SELECTOR).on('input', () => { $(FORM_SELECTOR).on('input', () => {
triggered = true; triggered = true;
...@@ -204,10 +181,8 @@ describe('ShortcutsIssuable', () => { ...@@ -204,10 +181,8 @@ describe('ShortcutsIssuable', () => {
ShortcutsIssuable.replyWithSelectedText(true); ShortcutsIssuable.replyWithSelectedText(true);
setImmediate(() => { await waitForPromises();
expect(triggered).toBe(true); expect(triggered).toBe(true);
done();
});
}); });
}); });
...@@ -231,26 +206,22 @@ describe('ShortcutsIssuable', () => { ...@@ -231,26 +206,22 @@ describe('ShortcutsIssuable', () => {
}); });
}); });
it('adds the quoted selection to the input', (done) => { it('adds the quoted selection to the input', async () => {
ShortcutsIssuable.replyWithSelectedText(true); ShortcutsIssuable.replyWithSelectedText(true);
setImmediate(() => { await waitForPromises();
expect($(FORM_SELECTOR).val()).toBe('> *Selected text.*\n\n'); expect($(FORM_SELECTOR).val()).toBe('> *Selected text.*\n\n');
done();
});
}); });
it('triggers `focus`', (done) => { it('triggers `focus`', async () => {
const spy = jest.spyOn(document.querySelector(FORM_SELECTOR), 'focus'); const spy = jest.spyOn(document.querySelector(FORM_SELECTOR), 'focus');
ShortcutsIssuable.replyWithSelectedText(true); ShortcutsIssuable.replyWithSelectedText(true);
setImmediate(() => { await waitForPromises();
expect(spy).toHaveBeenCalled(); expect(spy).toHaveBeenCalled();
done();
});
}); });
it('triggers `input`', (done) => { it('triggers `input`', async () => {
let triggered = false; let triggered = false;
$(FORM_SELECTOR).on('input', () => { $(FORM_SELECTOR).on('input', () => {
triggered = true; triggered = true;
...@@ -258,10 +229,8 @@ describe('ShortcutsIssuable', () => { ...@@ -258,10 +229,8 @@ describe('ShortcutsIssuable', () => {
ShortcutsIssuable.replyWithSelectedText(true); ShortcutsIssuable.replyWithSelectedText(true);
setImmediate(() => { await waitForPromises();
expect(triggered).toBe(true); expect(triggered).toBe(true);
done();
});
}); });
}); });
...@@ -285,36 +254,29 @@ describe('ShortcutsIssuable', () => { ...@@ -285,36 +254,29 @@ describe('ShortcutsIssuable', () => {
}); });
}); });
it('does not add anything to the input', (done) => { it('does not add anything to the input', async () => {
ShortcutsIssuable.replyWithSelectedText(true); ShortcutsIssuable.replyWithSelectedText(true);
setImmediate(() => { await waitForPromises();
expect($(FORM_SELECTOR).val()).toBe(''); expect($(FORM_SELECTOR).val()).toBe('');
done();
});
}); });
it('triggers `focus`', (done) => { it('triggers `focus`', async () => {
const spy = jest.spyOn(document.querySelector(FORM_SELECTOR), 'focus'); const spy = jest.spyOn(document.querySelector(FORM_SELECTOR), 'focus');
ShortcutsIssuable.replyWithSelectedText(true); ShortcutsIssuable.replyWithSelectedText(true);
setImmediate(() => { await waitForPromises();
expect(spy).toHaveBeenCalled(); expect(spy).toHaveBeenCalled();
done();
});
}); });
}); });
describe('with a valid selection with no text content', () => { describe('with a valid selection with no text content', () => {
it('returns the proper markdown', (done) => { it('returns the proper markdown', async () => {
stubSelection('<img src="https://gitlab.com/logo.png" alt="logo" />'); stubSelection('<img src="https://gitlab.com/logo.png" alt="logo" />');
ShortcutsIssuable.replyWithSelectedText(true); ShortcutsIssuable.replyWithSelectedText(true);
setImmediate(() => { await waitForPromises();
expect($(FORM_SELECTOR).val()).toBe('> ![logo](https://gitlab.com/logo.png)\n\n'); expect($(FORM_SELECTOR).val()).toBe('> ![logo](https://gitlab.com/logo.png)\n\n');
done();
});
}); });
}); });
}); });
......
...@@ -41,34 +41,30 @@ describe('Blob viewer', () => { ...@@ -41,34 +41,30 @@ describe('Blob viewer', () => {
window.location.hash = ''; window.location.hash = '';
}); });
it('loads source file after switching views', (done) => { it('loads source file after switching views', async () => {
document.querySelector('.js-blob-viewer-switch-btn[data-viewer="simple"]').click(); document.querySelector('.js-blob-viewer-switch-btn[data-viewer="simple"]').click();
setImmediate(() => { await axios.waitForAll();
expect( expect(
document document
.querySelector('.js-blob-viewer-switch-btn[data-viewer="simple"]') .querySelector('.js-blob-viewer-switch-btn[data-viewer="simple"]')
.classList.contains('hidden'), .classList.contains('hidden'),
).toBeFalsy(); ).toBeFalsy();
done();
});
}); });
it('loads source file when line number is in hash', (done) => { it('loads source file when line number is in hash', async () => {
window.location.hash = '#L1'; window.location.hash = '#L1';
new BlobViewer(); new BlobViewer();
setImmediate(() => { await axios.waitForAll();
expect( expect(
document document
.querySelector('.js-blob-viewer-switch-btn[data-viewer="simple"]') .querySelector('.js-blob-viewer-switch-btn[data-viewer="simple"]')
.classList.contains('hidden'), .classList.contains('hidden'),
).toBeFalsy(); ).toBeFalsy();
done();
});
}); });
it('doesnt reload file if already loaded', () => { it('doesnt reload file if already loaded', () => {
...@@ -123,24 +119,20 @@ describe('Blob viewer', () => { ...@@ -123,24 +119,20 @@ describe('Blob viewer', () => {
expect(copyButton.blur).not.toHaveBeenCalled(); expect(copyButton.blur).not.toHaveBeenCalled();
}); });
it('enables after switching to simple view', (done) => { it('enables after switching to simple view', async () => {
document.querySelector('.js-blob-viewer-switch-btn[data-viewer="simple"]').click(); document.querySelector('.js-blob-viewer-switch-btn[data-viewer="simple"]').click();
setImmediate(() => { await axios.waitForAll();
expect(copyButton.classList.contains('disabled')).toBeFalsy();
done(); expect(copyButton.classList.contains('disabled')).toBeFalsy();
});
}); });
it('updates tooltip after switching to simple view', (done) => { it('updates tooltip after switching to simple view', async () => {
document.querySelector('.js-blob-viewer-switch-btn[data-viewer="simple"]').click(); document.querySelector('.js-blob-viewer-switch-btn[data-viewer="simple"]').click();
setImmediate(() => { await axios.waitForAll();
expect(copyButtonTooltip.getAttribute('title')).toBe('Copy file contents');
done(); expect(copyButtonTooltip.getAttribute('title')).toBe('Copy file contents');
});
}); });
}); });
......
import { nextTick } from 'vue';
import { TEST_HOST } from 'helpers/test_constants'; import { TEST_HOST } from 'helpers/test_constants';
import initConfirmModal from '~/confirm_modal'; import initConfirmModal from '~/confirm_modal';
...@@ -50,7 +49,6 @@ describe('ConfirmModal', () => { ...@@ -50,7 +49,6 @@ describe('ConfirmModal', () => {
const findModal = () => document.querySelector('.gl-modal'); const findModal = () => document.querySelector('.gl-modal');
const findModalOkButton = (modal, variant) => const findModalOkButton = (modal, variant) =>
modal.querySelector(`.modal-footer .btn-${variant}`); modal.querySelector(`.modal-footer .btn-${variant}`);
const findModalCancelButton = (modal) => modal.querySelector('.modal-footer .btn-secondary');
const modalIsHidden = () => findModal() === null; const modalIsHidden = () => findModal() === null;
const serializeModal = (modal, buttonIndex) => { const serializeModal = (modal, buttonIndex) => {
...@@ -90,19 +88,6 @@ describe('ConfirmModal', () => { ...@@ -90,19 +88,6 @@ describe('ConfirmModal', () => {
expect(findModal()).not.toBe(null); expect(findModal()).not.toBe(null);
expect(modalIsHidden()).toBe(false); expect(modalIsHidden()).toBe(false);
}); });
describe('Cancel Button', () => {
beforeEach(async () => {
findModalCancelButton(findModal()).click();
await nextTick();
});
it('closes the modal', () => {
setImmediate(() => {
expect(modalIsHidden()).toBe(true);
});
});
});
}); });
}); });
......
...@@ -544,10 +544,8 @@ describe('DiffsStoreActions', () => { ...@@ -544,10 +544,8 @@ describe('DiffsStoreActions', () => {
[{ type: types.SET_DIFF_VIEW_TYPE, payload: INLINE_DIFF_VIEW_TYPE }], [{ type: types.SET_DIFF_VIEW_TYPE, payload: INLINE_DIFF_VIEW_TYPE }],
[], [],
() => { () => {
setImmediate(() => {
expect(Cookies.get('diff_view')).toEqual(INLINE_DIFF_VIEW_TYPE); expect(Cookies.get('diff_view')).toEqual(INLINE_DIFF_VIEW_TYPE);
done(); done();
});
}, },
); );
}); });
...@@ -562,10 +560,8 @@ describe('DiffsStoreActions', () => { ...@@ -562,10 +560,8 @@ describe('DiffsStoreActions', () => {
[{ type: types.SET_DIFF_VIEW_TYPE, payload: PARALLEL_DIFF_VIEW_TYPE }], [{ type: types.SET_DIFF_VIEW_TYPE, payload: PARALLEL_DIFF_VIEW_TYPE }],
[], [],
() => { () => {
setImmediate(() => {
expect(Cookies.get(DIFF_VIEW_COOKIE_NAME)).toEqual(PARALLEL_DIFF_VIEW_TYPE); expect(Cookies.get(DIFF_VIEW_COOKIE_NAME)).toEqual(PARALLEL_DIFF_VIEW_TYPE);
done(); done();
});
}, },
); );
}); });
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment