Welcome to mirror list, hosted at ThFree Co, Russian Federation.

feature_highlight_options_spec.js « feature_highlight « frontend « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: f82f984cb7f6aa44c732b198e38207b7f1900a43 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import { GlBreakpointInstance as bp } from '@gitlab/ui/dist/utils';
import domContentLoaded from '~/feature_highlight/feature_highlight_options';

describe('feature highlight options', () => {
  describe('domContentLoaded', () => {
    it.each`
      breakPoint | shouldCall
      ${'xs'}    | ${false}
      ${'sm'}    | ${false}
      ${'md'}    | ${false}
      ${'lg'}    | ${false}
      ${'xl'}    | ${true}
    `(
      'when breakpoint is $breakPoint should call highlightFeatures is $shouldCall',
      ({ breakPoint, shouldCall }) => {
        jest.spyOn(bp, 'getBreakpointSize').mockReturnValue(breakPoint);

        expect(domContentLoaded()).toBe(shouldCall);
      },
    );
  });
});