2020-09-07 17:31:10 +00:00
|
|
|
module.exports = {
|
|
|
|
...require( '@wordpress/scripts/config/jest-e2e.config' ),
|
|
|
|
rootDir: '../../../',
|
|
|
|
// Automatically clear mock calls and instances between every test
|
|
|
|
clearMocks: true,
|
|
|
|
moduleNameMapper: {
|
|
|
|
'@woocommerce/blocks-test-utils': '<rootDir>/tests/utils',
|
|
|
|
},
|
|
|
|
|
2021-10-08 10:58:44 +00:00
|
|
|
reporters: [
|
|
|
|
'default',
|
|
|
|
[
|
|
|
|
'jest-html-reporters',
|
|
|
|
{ publicPath: './reports/e2e', filename: 'index.html' },
|
|
|
|
],
|
2022-07-18 09:38:49 +00:00
|
|
|
process.env.CI && '@wordpress/e2e-tests/config/flaky-tests-reporter.js',
|
|
|
|
].filter( Boolean ),
|
2021-10-08 10:58:44 +00:00
|
|
|
|
|
|
|
testEnvironment: '<rootDir>/tests/e2e/config/environment.js',
|
|
|
|
testRunner: 'jest-circus/runner',
|
2020-09-07 17:31:10 +00:00
|
|
|
// Where to look for test files
|
|
|
|
roots: [ '<rootDir>/tests/e2e/specs' ],
|
|
|
|
globalSetup: '<rootDir>/tests/e2e/config/setup.js',
|
|
|
|
globalTeardown: '<rootDir>/tests/e2e/config/teardown.js',
|
|
|
|
setupFiles: [],
|
|
|
|
// A list of paths to modules that run some code to configure or set up the testing framework
|
|
|
|
// before each test
|
|
|
|
setupFilesAfterEnv: [
|
|
|
|
'<rootDir>/tests/e2e/config/custom-matchers/index.js',
|
|
|
|
'<rootDir>/tests/e2e/config/jest.setup.js',
|
|
|
|
'expect-puppeteer',
|
|
|
|
],
|
2022-12-12 15:06:25 +00:00
|
|
|
testPathIgnorePatterns: [
|
|
|
|
'<rootDir>/tests/e2e/specs/performance',
|
|
|
|
// Ignore all the files that have utils in the name
|
|
|
|
'utils',
|
|
|
|
],
|
2020-09-07 17:31:10 +00:00
|
|
|
transformIgnorePatterns: [ 'node_modules/(?!(woocommerce)/)' ],
|
2023-01-05 11:21:22 +00:00
|
|
|
testMatch: [ '**/?(*.)+(spec|test).[jt]s?(x)' ],
|
2020-09-07 17:31:10 +00:00
|
|
|
};
|