From efa1be028e74a3a59eff5e15c46d2e5eac6210a1 Mon Sep 17 00:00:00 2001 From: Pierre Burgy Date: Thu, 20 Oct 2016 18:46:35 +0200 Subject: [PATCH] Fix tests --- public/app/app.js | 20 ------------------- .../LocaleToggle/tests/index.test.js | 2 +- 2 files changed, 1 insertion(+), 21 deletions(-) diff --git a/public/app/app.js b/public/app/app.js index 7f5fb2d1a9..0570502b34 100644 --- a/public/app/app.js +++ b/public/app/app.js @@ -90,7 +90,6 @@ window.onload = function onLoad() { Promise.all([ System.import('intl'), System.import('intl/locale-data/jsonp/en.js'), - System.import('intl/locale-data/jsonp/en.js'), System.import('intl/locale-data/jsonp/fr.js'), ]).then(() => render(translationMessages)); } else { @@ -98,25 +97,6 @@ window.onload = function onLoad() { } }; -// Chunked polyfill for browsers without Intl support -if (!window.Intl) { - (new Promise((resolve) => { - resolve(System.import('intl')); - })) - .then(() => Promise.all([ - System.import('intl/locale-data/jsonp/en.js'), - System.import('intl/locale-data/jsonp/de.js'), - System.import('intl/locale-data/jsonp/en.js'), - System.import('intl/locale-data/jsonp/fr.js'), - ])) - .then(() => render(translationMessages)) - .catch((err) => { - throw err; - }); -} else { - render(translationMessages); -} - // Install ServiceWorker and AppCache in the end since // it's not most important operation and if main code fails, // we do not want it installed diff --git a/public/app/containers/LocaleToggle/tests/index.test.js b/public/app/containers/LocaleToggle/tests/index.test.js index fdc76f0d4d..2bbbd2ce2a 100644 --- a/public/app/containers/LocaleToggle/tests/index.test.js +++ b/public/app/containers/LocaleToggle/tests/index.test.js @@ -36,7 +36,7 @@ describe('', () => { ); - expect(renderedComponent.contains()).toEqual(true); + expect(renderedComponent.contains()).toEqual(true); }); describe('mapDispatchToProps', () => {