diff options
Diffstat (limited to 'spec/frontend/feature_highlight')
-rw-r--r-- | spec/frontend/feature_highlight/feature_highlight_options_spec.js | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/spec/frontend/feature_highlight/feature_highlight_options_spec.js b/spec/frontend/feature_highlight/feature_highlight_options_spec.js index cd41d1ed091..8b75c46fd4c 100644 --- a/spec/frontend/feature_highlight/feature_highlight_options_spec.js +++ b/spec/frontend/feature_highlight/feature_highlight_options_spec.js @@ -1,5 +1,5 @@ +import { GlBreakpointInstance as bp } from '@gitlab/ui/dist/utils'; import domContentLoaded from '~/feature_highlight/feature_highlight_options'; -import bp from '~/breakpoints'; describe('feature highlight options', () => { describe('domContentLoaded', () => { @@ -21,9 +21,15 @@ describe('feature highlight options', () => { expect(domContentLoaded()).toBe(false); }); - it('should call highlightFeatures when breakpoint is lg', () => { + it('should not call highlightFeatures when breakpoint is not xl', () => { jest.spyOn(bp, 'getBreakpointSize').mockReturnValue('lg'); + expect(domContentLoaded()).toBe(false); + }); + + it('should call highlightFeatures when breakpoint is xl', () => { + jest.spyOn(bp, 'getBreakpointSize').mockReturnValue('xl'); + expect(domContentLoaded()).toBe(true); }); }); |