message: jest-haste-map: add test case for broken handling of ignore pattern
diff: @@ -548,6 +548,36 @@ describe('HasteMap', () => {
  });
  });
  + it('discards the cache when configuration changes (broken)', () => {
  + return new HasteMap(defaultConfig)
  + .build()
  + .then(() => {
  + fs.readFileSync.mockClear();
  +
  + // Explicitly mock that no files have changed.
  + mockChangedFiles = Object.create(null);
  +
  + // Watchman would give us different clocks.
  + mockClocks = object({
  + '/fruits': 'c:fake-clock:3',
  + '/vegetables': 'c:fake-clock:4',
  + });
  +
  + const config = Object.assign(
  + {},
  + defaultConfig,
  + {ignorePattern: /kiwi|pear/},
  + );
  + return new HasteMap(config)
  + .build()
  + .then(({moduleMap}) => {
  + // `getModule` should actually return `null` here, because Pear
  + // should get ignored by the pattern.
  + expect(typeof moduleMap.getModule('Pear')).toBe('string');
  + });
  + });
  + });
  +
  it('ignores files that do not exist', () => {
  const watchman = require('../crawlers/watchman');
  const mockImpl = watchman.getMockImplementation();
  