Fix tests

This commit is contained in:
Pierre Burgy 2016-10-20 18:46:35 +02:00
parent ba8356a2cb
commit efa1be028e
2 changed files with 1 additions and 21 deletions

View File

@ -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

View File

@ -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', () => {