mirror of
https://github.com/strapi/strapi.git
synced 2025-09-26 00:39:49 +00:00
Fix tests
This commit is contained in:
parent
ba8356a2cb
commit
efa1be028e
@ -90,7 +90,6 @@ window.onload = function onLoad() {
|
|||||||
Promise.all([
|
Promise.all([
|
||||||
System.import('intl'),
|
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/en.js'),
|
|
||||||
System.import('intl/locale-data/jsonp/fr.js'),
|
System.import('intl/locale-data/jsonp/fr.js'),
|
||||||
]).then(() => render(translationMessages));
|
]).then(() => render(translationMessages));
|
||||||
} else {
|
} 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
|
// Install ServiceWorker and AppCache in the end since
|
||||||
// it's not most important operation and if main code fails,
|
// it's not most important operation and if main code fails,
|
||||||
// we do not want it installed
|
// we do not want it installed
|
||||||
|
@ -36,7 +36,7 @@ describe('<LocaleToggle />', () => {
|
|||||||
</LanguageProvider>
|
</LanguageProvider>
|
||||||
</Provider>
|
</Provider>
|
||||||
);
|
);
|
||||||
expect(renderedComponent.contains(<option value="en">en</option>)).toEqual(true);
|
expect(renderedComponent.contains(<option value="en">EN</option>)).toEqual(true);
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('mapDispatchToProps', () => {
|
describe('mapDispatchToProps', () => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user