jest.config.js
| 1 | /** |
| 2 | * External dependencies |
| 3 | */ |
| 4 | const path = require( 'path' ); |
| 5 | |
| 6 | module.exports = { |
| 7 | preset: '@automattic/calypso-build', |
| 8 | testEnvironment: 'jsdom', |
| 9 | roots: [ '<rootDir>/extensions/', '<rootDir>/modules/search/instant-search' ], |
| 10 | transform: { |
| 11 | '\\.[jt]sx?$': path.join( __dirname, 'tests', 'jest-extensions-babel-transform' ), |
| 12 | '\\.(gif|jpg|jpeg|png|svg|scss|sass|css)$': require.resolve( |
| 13 | '@automattic/calypso-build/jest/transform/asset' |
| 14 | ), |
| 15 | }, |
| 16 | coverageDirectory: 'coverage/extensions', |
| 17 | setupFiles: [ '<rootDir>/tests/jest-globals.js' ], |
| 18 | testPathIgnorePatterns: [ 'node_modules', 'extensions/shared/test/block-fixtures.js' ], |
| 19 | }; |
| 20 |