2019-07-23 13:08:36 +00:00
|
|
|
/**
|
|
|
|
* @flow strict
|
|
|
|
* @format
|
|
|
|
*/
|
|
|
|
|
|
|
|
// https://jestjs.io/docs/en/configuration.html
|
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
// Automatically clear mock calls and instances between every test
|
|
|
|
clearMocks: true,
|
|
|
|
|
|
|
|
// An array of file extensions your modules use
|
|
|
|
moduleFileExtensions: [ 'js' ],
|
|
|
|
|
|
|
|
preset: 'jest-puppeteer',
|
|
|
|
|
|
|
|
// Where to look for test files
|
2019-08-23 10:34:07 +00:00
|
|
|
roots: [ '<rootDir>/tests/e2e-tests/specs' ],
|
2019-07-23 13:08:36 +00:00
|
|
|
|
|
|
|
//setupFiles: [ '<rootDir>/.node_modules/regenerator-runtime/runtime' ],
|
|
|
|
|
|
|
|
// A list of paths to modules that run some code to configure or set up the testing framework
|
|
|
|
// before each test
|
|
|
|
setupFilesAfterEnv: [
|
2019-08-23 10:34:07 +00:00
|
|
|
'<rootDir>/tests/e2e-tests/config/jest.setup.js',
|
2019-07-23 13:08:36 +00:00
|
|
|
'expect-puppeteer',
|
|
|
|
],
|
|
|
|
|
|
|
|
// The glob patterns Jest uses to detect test files
|
|
|
|
testMatch: [ '**/*.(test|spec).js' ],
|
2019-11-23 17:40:29 +00:00
|
|
|
|
|
|
|
// Sort test path alphabetically. This is needed so that `activate-and-setup` tests run first
|
|
|
|
testSequencer: '<rootDir>/tests/e2e-tests/config/jest-custom-sequencer.js',
|
2019-07-23 13:08:36 +00:00
|
|
|
};
|