Skip to content

Commit

Permalink
fix(jest-haste-map): don't throw on missing mapper in Node crawler (#…
Browse files Browse the repository at this point in the history
…8558)

* fix(jest-haste-map): don't pass mapper to Node crawler

* add changelog

* get rid of throwing when mapper passed to node crawler
  • Loading branch information
thymikee authored and cpojer committed Jun 13, 2019
1 parent 3748557 commit 43d1cf6
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
- `[babel-plugin-jest-hoist]` Expand list of whitelisted globals in global mocks ([#8429](https://github.com/facebook/jest/pull/8429)
- `[jest-core]` Make watch plugin initialization errors look nice ([#8422](https://github.com/facebook/jest/pull/8422))
- `[jest-snapshot]` Prevent inline snapshots from drifting when inline snapshots are updated ([#8492](https://github.com/facebook/jest/pull/8492))
- `[jest-haste-map]` Don't throw on missing mapper in Node crawler ([#8558](https://github.com/facebook/jest/pull/8558))

### Chore & Maintenance

Expand Down
1 change: 1 addition & 0 deletions packages/jest-haste-map/src/__tests__/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,7 @@ describe('HasteMap', () => {
const hasteMap = new HasteMap({
...defaultConfig,
computeSha1: true,
mapper: file => [file],
maxWorkers: 1,
useWatchman,
});
Expand Down
4 changes: 0 additions & 4 deletions packages/jest-haste-map/src/crawlers/node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,10 +139,6 @@ export = function nodeCrawl(
removedFiles: FileData;
hasteMap: InternalHasteMap;
}> {
if (options.mapper) {
throw new Error(`Option 'mapper' isn't supported by the Node crawler`);
}

const {
data,
extensions,
Expand Down

0 comments on commit 43d1cf6

Please sign in to comment.