gitlab-org--gitlab-foss/spec/frontend/lib/logger/hello_spec.js

21 lines
501 B
JavaScript
Raw Normal View History

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();
});
});
});