2020-03-09 13:42:32 +05:30
|
|
|
import { GlBreakpointInstance as bp } from '@gitlab/ui/dist/utils';
|
2018-03-17 18:26:18 +05:30
|
|
|
import domContentLoaded from '~/feature_highlight/feature_highlight_options';
|
|
|
|
|
|
|
|
describe('feature highlight options', () => {
|
|
|
|
describe('domContentLoaded', () => {
|
2020-05-24 23:13:21 +05:30
|
|
|
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);
|
|
|
|
},
|
|
|
|
);
|
2018-03-17 18:26:18 +05:30
|
|
|
});
|
|
|
|
});
|