Skip to content

Commit

Permalink
Prevents watchers from being awake by created folders
Browse files Browse the repository at this point in the history
  • Loading branch information
Maël Nison committed Aug 9, 2018
1 parent c0819fc commit c043339
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/jest-haste-map/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import {version as VERSION} from '../package.json';
import {getSha1, worker} from './worker';
import crypto from 'crypto';
import EventEmitter from 'events';
import fs from 'fs';
import getMockName from './get_mock_name';
import getPlatformExtension from './lib/get_platform_extension';
import H from './constants';
Expand Down Expand Up @@ -719,10 +720,11 @@ class HasteMap extends EventEmitter {
type: string,
filePath: Path,
root: Path,
stat: {mtime: Date},
stat: fs.Stats,
) => {
filePath = path.join(root, normalizePathSep(filePath));
if (
stat.isDirectory() ||
this._ignore(filePath) ||
!extensions.some(extension => filePath.endsWith(extension))
) {
Expand Down

0 comments on commit c043339

Please sign in to comment.