mirror of
https://github.com/strapi/strapi.git
synced 2025-09-25 16:29:34 +00:00
Fix tests
This commit is contained in:
parent
ba8356a2cb
commit
efa1be028e
@ -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
|
||||
|
@ -36,7 +36,7 @@ describe('<LocaleToggle />', () => {
|
||||
</LanguageProvider>
|
||||
</Provider>
|
||||
);
|
||||
expect(renderedComponent.contains(<option value="en">en</option>)).toEqual(true);
|
||||
expect(renderedComponent.contains(<option value="en">EN</option>)).toEqual(true);
|
||||
});
|
||||
|
||||
describe('mapDispatchToProps', () => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user