Resolves the test sequencer even when not explicitly set#8267
Resolves the test sequencer even when not explicitly set#8267scotthovestadt merged 7 commits intomasterfrom
Conversation
Yeah... |
| options.testRunner = require.resolve('jest-jasmine2'); | ||
| } | ||
|
|
||
| if (!options.testSequencer) { |
There was a problem hiding this comment.
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,
});There was a problem hiding this comment.
There was a problem hiding this comment.
(might be a slippery slope, and should rather be part of a larger refactor of normalize)
SimenB
left a comment
There was a problem hiding this comment.
If my comment doesn't make sense, feel free to ignore it 😀
scotthovestadt
left a comment
There was a problem hiding this comment.
Thank you! Just a lint error to resolve and then will release it.
|
e2e test |
|
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Summary
The default value of the test sequencer isn't resolved unless explicitly set (we only iterate on
options, which contains the user-defined options but not the default ones). This diff ensures that we callrequire.resolveto obtain the real default path of the sequencer (since@jest/coreis making the require call, it would fail otherwise under PnP).Test plan
I modified the code in my cache and checked that my tests were running. We probably should try to add an integration test for PnP at some point.