debian-mirror-gitlab/spec/frontend/lib/logger/hello_spec.js
2021-11-11 11:23:49 +05:30

20 lines
501 B
JavaScript

import { logHello } from '~/lib/logger/hello';
describe('~/lib/logger/hello', () => {
let consoleLogSpy;
beforeEach(() => {
// We don't `mockImplementation` so we can validate there's no errors thrown
consoleLogSpy = jest.spyOn(console, 'log');
});
describe('logHello', () => {
it('console logs a friendly hello message', () => {
expect(consoleLogSpy).not.toHaveBeenCalled();
logHello();
expect(consoleLogSpy.mock.calls).toMatchSnapshot();
});
});
});