summaryrefslogtreecommitdiff
path: root/spec/frontend/lib/logger/hello_spec.js
blob: 39abe0e0dd013ec932a5037ca9113de475a999d2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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();
    });
  });
});