debian-mirror-gitlab/spec/frontend/lib/logger/hello_deferred_spec.js

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

18 lines
464 B
JavaScript
Raw Normal View History

2021-11-11 11:23:49 +05:30
import waitForPromises from 'helpers/wait_for_promises';
import { logHello } from '~/lib/logger/hello';
import { logHelloDeferred } from '~/lib/logger/hello_deferred';
jest.mock('~/lib/logger/hello');
describe('~/lib/logger/hello_deferred', () => {
it('dynamically imports and calls logHello', async () => {
logHelloDeferred();
expect(logHello).not.toHaveBeenCalled();
await waitForPromises();
expect(logHello).toHaveBeenCalled();
});
});