diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-12-23 18:07:48 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-12-23 18:07:48 +0300 |
commit | fda8735029d5aea76060f2e2b071ebcd6cd0777e (patch) | |
tree | 785f01501ab938aeed86fea53063e4598dd28d81 /spec/frontend/feature_highlight | |
parent | 4aeb8a02c506eaa8f0710ee17edd9e35dd68d280 (diff) |
Add latest changes from gitlab-org/gitlab@master
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); }); }); |