diff --git a/packager/react-packager/src/DependencyResolver/__tests__/Module-test.js b/packager/react-packager/src/DependencyResolver/__tests__/Module-test.js index 5b16b8e40e3b0d..237bab5d970499 100644 --- a/packager/react-packager/src/DependencyResolver/__tests__/Module-test.js +++ b/packager/react-packager/src/DependencyResolver/__tests__/Module-test.js @@ -13,7 +13,6 @@ jest .dontMock('../fastfs') .dontMock('../replacePatterns') .dontMock('../DependencyGraph/docblock') - .dontMock('../../FileWatcher') .dontMock('../Module'); jest @@ -24,10 +23,12 @@ var Module = require('../Module'); var ModuleCache = require('../ModuleCache'); var Promise = require('promise'); var fs = require('fs'); -var FileWatcher = require('../../FileWatcher'); describe('Module', () => { - const fileWatcher = new FileWatcher(['/root']); + const fileWatcher = { + on: () => this, + isWatchman: () => Promise.resolve(false), + }; describe('Async Dependencies', () => { function expectAsyncDependenciesToEqual(expected) { diff --git a/packager/react-packager/src/DependencyResolver/fastfs.js b/packager/react-packager/src/DependencyResolver/fastfs.js index 363090bfd84c04..d34892ddd391b4 100644 --- a/packager/react-packager/src/DependencyResolver/fastfs.js +++ b/packager/react-packager/src/DependencyResolver/fastfs.js @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ 'use strict'; const Promise = require('promise'); diff --git a/packager/react-packager/src/__mocks__/fs.js b/packager/react-packager/src/__mocks__/fs.js index ced46a984efaf2..1aca92500ae05e 100644 --- a/packager/react-packager/src/__mocks__/fs.js +++ b/packager/react-packager/src/__mocks__/fs.js @@ -81,7 +81,7 @@ fs.stat.mockImpl(function(filepath, callback) { var mtime = { getTime: function() { return Math.ceil(Math.random() * 10000000); - } + }, }; if (node.SYMLINK) {