diff options
Diffstat (limited to 'spec/frontend/helpers/startup_css_helper_spec.js')
-rw-r--r-- | spec/frontend/helpers/startup_css_helper_spec.js | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/spec/frontend/helpers/startup_css_helper_spec.js b/spec/frontend/helpers/startup_css_helper_spec.js index 2d560c43fa5..703bdbd342f 100644 --- a/spec/frontend/helpers/startup_css_helper_spec.js +++ b/spec/frontend/helpers/startup_css_helper_spec.js @@ -39,24 +39,7 @@ describe('waitForCSSLoaded', () => { }); }); - describe('with startup css disabled', () => { - gon.features = { - startupCss: false, - }; - - it('should invoke the action right away', async () => { - const events = waitForCSSLoaded(mockedCallback); - await events; - - expect(mockedCallback).toHaveBeenCalledTimes(1); - }); - }); - describe('with startup css enabled', () => { - gon.features = { - startupCss: true, - }; - it('should dispatch CSSLoaded when the assets are cached or already loaded', async () => { setFixtures(` <link href="one.css" data-startupcss="loaded"> @@ -75,7 +58,7 @@ describe('waitForCSSLoaded', () => { const events = waitForCSSLoaded(mockedCallback); document .querySelectorAll('[data-startupcss="loading"]') - .forEach(elem => elem.setAttribute('data-startupcss', 'loaded')); + .forEach((elem) => elem.setAttribute('data-startupcss', 'loaded')); document.dispatchEvent(new CustomEvent('CSSStartupLinkLoaded')); await events; |