Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

### Fixes

- `[@jest/config]` Normalize `testSequencer` to its absolute path ([#8267](https://github.com/facebook/jest/pull/8267))

### Chore & Maintenance

### Performance
Expand Down
4 changes: 4 additions & 0 deletions packages/jest-config/src/normalize.ts
Original file line number Diff line number Diff line change
Expand Up @@ -478,6 +478,10 @@ export default function normalize(
options.testRunner = require.resolve('jest-jasmine2');
}

if (!options.testSequencer) {
Copy link
Member

@SimenB SimenB Apr 3, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch. Do we need the if at all? Or can we do what we do on line 463?

  options.testEnvironment = getTestEnvironment({
    rootDir: options.rootDir,
    testEnvironment: options.testEnvironment || DEFAULT_CONFIG.testEnvironment,
  });

So (ish)

  options.testSequencer = getTestSequencer({
    rootDir: options.rootDir,
    testSequencer: options.testSequencer || DEFAULT_CONFIG.testSequencer,
  });

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(might be a slippery slope, and should rather be part of a larger refactor of normalize)

options.testSequencer = require.resolve('@jest/test-sequencer');
}

if (!options.coverageDirectory) {
options.coverageDirectory = path.resolve(options.rootDir, 'coverage');
}
Expand Down