From 575982b96dfd959f72ce8f44bc7d3f3c5e102597 Mon Sep 17 00:00:00 2001 From: Dan Abramov Date: Thu, 23 Nov 2017 18:02:47 +0000 Subject: [PATCH] Forbid Haste in Jest (#11647) --- scripts/jest/config.source.js | 3 +++ scripts/jest/noHaste.js | 8 ++++++++ 2 files changed, 11 insertions(+) create mode 100644 scripts/jest/noHaste.js diff --git a/scripts/jest/config.source.js b/scripts/jest/config.source.js index 7aa6243d82..d3436e1ea4 100644 --- a/scripts/jest/config.source.js +++ b/scripts/jest/config.source.js @@ -1,6 +1,9 @@ 'use strict'; module.exports = { + haste: { + hasteImplModulePath: require.resolve('./noHaste.js'), + }, modulePathIgnorePatterns: [ '/scripts/rollup/shims/', '/scripts/bench/', diff --git a/scripts/jest/noHaste.js b/scripts/jest/noHaste.js new file mode 100644 index 0000000000..bf0e315b22 --- /dev/null +++ b/scripts/jest/noHaste.js @@ -0,0 +1,8 @@ +'use strict'; + +module.exports = { + getHasteName() { + // We never want Haste. + return null; + }, +};