diff --git a/packages/gasket-react-intl/test/utils.test.js b/packages/gasket-react-intl/test/utils.test.js
index b36a5ba32..798d656de 100644
--- a/packages/gasket-react-intl/test/utils.test.js
+++ b/packages/gasket-react-intl/test/utils.test.js
@@ -7,31 +7,31 @@ jest.mock('../src/config', () => ({
manifest: require('./fixtures/mock-manifest.json')
}));
-describe('utils', () => {
+describe('utils', function () {
let mockConfig;
- beforeEach(() => {
+ beforeEach(function () {
mockConfig = require('../src/config');
});
- afterEach(() => {
+ afterEach(function () {
jest.restoreAllMocks();
delete global.window.gasketIntlLocale;
delete global.navigator.languages;
});
- it('exports localeUtils instance', () => {
+ it('exports localeUtils instance', function () {
expect(utils).toHaveProperty('localeUtils');
expect(utils.localeUtils).toBeInstanceOf(LocaleUtils);
});
- describe('getActiveLocale', () => {
- it('returns defaultLocale from manifest', () => {
+ describe('getActiveLocale', function () {
+ it('returns defaultLocale from manifest', function () {
const results = utils.getActiveLocale();
expect(results).toEqual(mockConfig.manifest.defaultLocale);
});
- it('returns locale from window property', () => {
+ it('returns locale from window property', function () {
mockConfig.isBrowser = true;
mockConfig.clientData.locale = 'fr';
global.window.gasketIntlLocale = 'de';
@@ -43,7 +43,7 @@ describe('utils', () => {
expect(results).toEqual('de');
});
- it('returns locale from clientData', () => {
+ it('returns locale from clientData', function () {
mockConfig.isBrowser = true;
mockConfig.clientData.locale = 'fr';
Object.defineProperty(global.navigator, 'languages', {
@@ -54,7 +54,7 @@ describe('utils', () => {
expect(results).toEqual('fr');
});
- it('returns locale from first navigator.languages', () => {
+ it('returns locale from first navigator.languages', function () {
mockConfig.isBrowser = true;
mockConfig.clientData.locale = null;
Object.defineProperty(global.navigator, 'languages', {
diff --git a/packages/gasket-react-intl/test/with-intl-provider.test.js b/packages/gasket-react-intl/test/with-intl-provider.test.js
index 516f2b92f..08e1bf0f0 100644
--- a/packages/gasket-react-intl/test/with-intl-provider.test.js
+++ b/packages/gasket-react-intl/test/with-intl-provider.test.js
@@ -9,21 +9,21 @@ const MockComponent = class extends React.Component {
}
};
-describe('withIntlProvider', () => {
+describe('withIntlProvider', function () {
let mockConfig;
let withIntlProvider;
- beforeEach(() => {
+ beforeEach(function () {
mockConfig = require('../src/config');
withIntlProvider = withIntlProviderDefault();
});
- it('adds display name', () => {
+ it('adds display name', function () {
const WrappedComponent = withIntlProvider(MockComponent);
expect(WrappedComponent.displayName).toBe('withIntlProvider(MockComponent)');
});
- it('hoists non-react statics', () => {
+ it('hoists non-react statics', function () {
const WrappedComponent = withIntlProvider(MockComponent);
expect(WrappedComponent).not.toHaveProperty('bogus');
MockComponent.bogus = 'BOGUS';
@@ -32,7 +32,7 @@ describe('withIntlProvider', () => {
delete MockComponent.bogus;
});
- it('hoists getInitialProps if set', () => {
+ it('hoists getInitialProps if set', function () {
const WrappedComponent = withIntlProvider(MockComponent);
expect(WrappedComponent).not.toHaveProperty('getInitialProps');
MockComponent.getInitialProps = f => f;
@@ -41,17 +41,17 @@ describe('withIntlProvider', () => {
delete MockComponent.getInitialProps;
});
- describe('reducer', () => {
+ describe('reducer', function () {
let initState;
- beforeEach(() => {
+ beforeEach(function () {
initState = {
messages: { en: { first: 'First' } },
status: { '/locales/en/first.json': LOADED }
};
});
- it('LOADED actions add messages and file status', () => {
+ it('LOADED actions add messages and file status', function () {
const action = { type: LOADED, payload: { locale: 'en', messages: { example: 'Example' }, file: '/locales/en.json' } };
const result = reducer(initState, action);
expect(result).toEqual({
@@ -68,7 +68,7 @@ describe('withIntlProvider', () => {
});
});
- it('ERROR actions add file status', () => {
+ it('ERROR actions add file status', function () {
const action = { type: ERROR, payload: { file: '/locales/en.json' } };
const result = reducer(initState, action);
expect(result).toEqual({
@@ -84,7 +84,7 @@ describe('withIntlProvider', () => {
});
});
- it('LOADING actions add file status', () => {
+ it('LOADING actions add file status', function () {
const action = { type: LOADING, payload: { file: '/locales/en.json' } };
const result = reducer(initState, action);
expect(result).toEqual({
@@ -101,8 +101,8 @@ describe('withIntlProvider', () => {
});
});
- describe('init', () => {
- it('initializes state with empty objects', () => {
+ describe('init', function () {
+ it('initializes state with empty objects', function () {
const result = init({});
expect(result).toEqual({
messages: {},
@@ -110,7 +110,7 @@ describe('withIntlProvider', () => {
});
});
- it('initializes state with locales props', () => {
+ it('initializes state with locales props', function () {
const result = init({
locale: 'en',
messages: { en: { example: 'Example' } },
@@ -122,7 +122,7 @@ describe('withIntlProvider', () => {
});
});
- it('merges locales props data with client data', () => {
+ it('merges locales props data with client data', function () {
mockConfig.clientData = {
locale: 'en',
messages: { en: { first: 'First' } },
diff --git a/packages/gasket-react-intl/test/with-locale-required.test.js b/packages/gasket-react-intl/test/with-locale-required.test.js
index 2283119fa..2a0d1c743 100644
--- a/packages/gasket-react-intl/test/with-locale-required.test.js
+++ b/packages/gasket-react-intl/test/with-locale-required.test.js
@@ -15,7 +15,7 @@ const MockComponent = class extends React.Component {
}
};
-describe('withLocaleRequired', () => {
+describe('withLocaleRequired', function () {
let useLocaleRequiredMock, wrapper;
const doMount = (...args) => {
@@ -23,25 +23,25 @@ describe('withLocaleRequired', () => {
return render(