-
-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathloadtests.js
More file actions
22 lines (18 loc) · 729 Bytes
/
loadtests.js
File metadata and controls
22 lines (18 loc) · 729 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
require('@babel/polyfill');
require('intl/locale-data/jsonp/en.js');
require('intl-pluralrules');
const _ = require('lodash');
const enzyme = require('enzyme');
const Adapter = require('enzyme-adapter-react-16');
const i18next = require('i18next');
// Should be initialized in calling module
if (_.get(i18next, 'options.returnEmptyString') === undefined) {
// Return key if no translation is present
i18next.init({ returnEmptyString: false, nsSeparator: '|' });
}
enzyme.configure({
adapter: new Adapter(),
disableLifecycleMethods: true,
});
const context = require.context('./test', true, /\.test\.js$/); // Load .js files in /test
context.keys().forEach(context); // eslint-disable-line lodash/prefer-lodash-method