mirror of
https://github.com/zebrajr/react.git
synced 2025-12-06 12:20:20 +01:00
Since we're not using haste at all, we can just remove the config to disable haste instead of enabling, just to inject an implementation that blocks any haste modules from being recognized. Test Plan: Creating a module and required it to get the expected error that the module doesn't exist.
32 lines
970 B
JavaScript
32 lines
970 B
JavaScript
'use strict';
|
|
|
|
module.exports = {
|
|
globalSetup: require.resolve('./setupGlobal.js'),
|
|
modulePathIgnorePatterns: [
|
|
'<rootDir>/scripts/rollup/shims/',
|
|
'<rootDir>/scripts/bench/',
|
|
],
|
|
transform: {
|
|
'.*': require.resolve('./preprocessor.js'),
|
|
},
|
|
setupFiles: [require.resolve('./setupEnvironment.js')],
|
|
setupFilesAfterEnv: [require.resolve('./setupTests.js')],
|
|
// Only include files directly in __tests__, not in nested folders.
|
|
testRegex: '/__tests__/[^/]*(\\.js|\\.coffee|[^d]\\.ts)$',
|
|
moduleFileExtensions: ['js', 'json', 'node', 'coffee', 'ts'],
|
|
rootDir: process.cwd(),
|
|
roots: ['<rootDir>/packages', '<rootDir>/scripts'],
|
|
collectCoverageFrom: ['packages/**/*.js'],
|
|
fakeTimers: {
|
|
enableGlobally: true,
|
|
legacyFakeTimers: true,
|
|
},
|
|
snapshotSerializers: [require.resolve('jest-snapshot-serializer-raw')],
|
|
|
|
testSequencer: require.resolve('./jestSequencer'),
|
|
|
|
testEnvironment: 'jsdom',
|
|
|
|
testRunner: 'jest-circus/runner',
|
|
};
|