diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-02-06 21:09:43 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-02-06 21:09:43 +0300 |
commit | 33998a0e768263828f497685ae030f585193317f (patch) | |
tree | 791e2c3322a17f668a2a4abdd251a8362885f381 /spec/frontend/lib | |
parent | 7b69a22d499787378aa30561822ef797a99c22e5 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/lib')
-rw-r--r-- | spec/frontend/lib/utils/common_utils_spec.js | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/spec/frontend/lib/utils/common_utils_spec.js b/spec/frontend/lib/utils/common_utils_spec.js index 08ba78cddff..947c38c8ae8 100644 --- a/spec/frontend/lib/utils/common_utils_spec.js +++ b/spec/frontend/lib/utils/common_utils_spec.js @@ -1,5 +1,4 @@ import * as commonUtils from '~/lib/utils/common_utils'; -import setWindowLocation from 'helpers/set_window_location_helper'; describe('common_utils', () => { describe('getPagePath', () => { @@ -1070,35 +1069,4 @@ describe('common_utils', () => { expect(result).toEqual([{ hello: '' }, { helloWorld: '' }]); }); }); - - describe('useNewFonts', () => { - let beforeGon; - const beforeLocation = window.location.href; - - beforeEach(() => { - window.gon = window.gon || {}; - beforeGon = { ...window.gon }; - }); - - describe.each` - featureFlag | queryParameter | fontEnabled - ${false} | ${false} | ${false} - ${true} | ${false} | ${true} - ${false} | ${true} | ${true} - `('new font', ({ featureFlag, queryParameter, fontEnabled }) => { - it(`will ${fontEnabled ? '' : 'NOT '}be applied when feature flag is ${ - featureFlag ? '' : 'NOT ' - }set and query parameter is ${queryParameter ? '' : 'NOT '}present`, () => { - const search = queryParameter ? `?new_fonts` : ''; - setWindowLocation(search); - window.gon = { features: { newFonts: featureFlag } }; - expect(commonUtils.useNewFonts()).toBe(fontEnabled); - }); - }); - - afterEach(() => { - window.gon = beforeGon; - setWindowLocation(beforeLocation); - }); - }); }); |