From 1afa045deaec9ed7a8c1f5e0f6f2711caee805bf Mon Sep 17 00:00:00 2001 From: Jean Lauliac Date: Tue, 15 Nov 2016 03:34:43 -0800 Subject: [PATCH] packager: DependencyGraph-test: mock child_process Reviewed By: cpojer Differential Revision: D4182064 fbshipit-source-id: e645e6d952e3aeaadaf35e29d6fcaf6395e590a7 --- .../src/node-haste/__tests__/DependencyGraph-test.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/react-packager/src/node-haste/__tests__/DependencyGraph-test.js b/react-packager/src/node-haste/__tests__/DependencyGraph-test.js index 83e8db69..655b14b5 100644 --- a/react-packager/src/node-haste/__tests__/DependencyGraph-test.js +++ b/react-packager/src/node-haste/__tests__/DependencyGraph-test.js @@ -13,7 +13,10 @@ jest.useRealTimers(); jest .mock('fs') .mock('../../Logger') - .mock('../../lib/TransformCache'); + .mock('../../lib/TransformCache') + // It's noticeably faster to prevent running watchman from FileWatcher. + .mock('child_process', () => ({})) + ; // This is an ugly hack: // * jest-haste-map uses `find` for fast file system crawling which won't work