Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolves the test sequencer even when not explicitly set #8267

Merged
merged 7 commits into from Apr 3, 2019
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -4,6 +4,7 @@

### Fixes

- `[@jest/config]` Normalize `testSequencer` to its absolute path ([#8267](https://github.com/facebook/jest/pull/8267))
- `[@jest/console]` Print to stderr when calling `console.error`, `console.warn` or `console.assert` using the `jest-runtime` CLI ([#8261](https://github.com/facebook/jest/pull/8261))

### Chore & Maintenance
Expand Down
16 changes: 5 additions & 11 deletions packages/jest-config/src/normalize.ts
Expand Up @@ -496,6 +496,11 @@ export default function normalize(
});
}

newOptions.testSequencer = getSequencer(newOptions.resolver, {
rootDir: options.rootDir,
filePath: options.testSequencer || DEFAULT_CONFIG.testSequencer,
});

const optionKeys = Object.keys(options) as Array<keyof Config.InitialOptions>;

optionKeys.reduce((newOptions, key: keyof Config.InitialOptions) => {
Expand Down Expand Up @@ -589,17 +594,6 @@ export default function normalize(
});
}
break;
case 'testSequencer':
{
const option = oldOptions[key];
value =
option &&
getSequencer(newOptions.resolver, {
filePath: option,
rootDir: options.rootDir,
});
}
break;
case 'prettierPath':
{
// We only want this to throw if "prettierPath" is explicitly passed
Expand Down