mirror of https://github.com/facebook/jest.git
Allow to pass `findRelatedTests` and `nonFlagArgs` to `updateConfigAndRun` (#10659)
This commit is contained in:
parent
9b9020b2f3
commit
1535af7659
|
@ -2,6 +2,8 @@
|
|||
|
||||
### Features
|
||||
|
||||
- `[jest-core]` Add `findRelatedTests` and `nonFlagArgs` in allowed config options for `updateConfigAndRun` in watch plugins ([#10659](https://github.com/facebook/jest/pull/10659))
|
||||
|
||||
### Fixes
|
||||
|
||||
### Chore & Maintenance
|
||||
|
|
|
@ -617,7 +617,7 @@ describe('Watch mode flows', () => {
|
|||
${'✖︎'} | ${'errorOnDeprecated'}
|
||||
${'✖︎'} | ${'expand'}
|
||||
${'✖︎'} | ${'filter'}
|
||||
${'✖︎'} | ${'findRelatedTests'}
|
||||
${'✔︎'} | ${'findRelatedTests'}
|
||||
${'✖︎'} | ${'forceExit'}
|
||||
${'✖︎'} | ${'globalSetup'}
|
||||
${'✖︎'} | ${'globalTeardown'}
|
||||
|
@ -626,7 +626,7 @@ describe('Watch mode flows', () => {
|
|||
${'✖︎'} | ${'listTests'}
|
||||
${'✖︎'} | ${'logHeapUsage'}
|
||||
${'✖︎'} | ${'maxWorkers'}
|
||||
${'✖︎'} | ${'nonFlagArgs'}
|
||||
${'✔︎'} | ${'nonFlagArgs'}
|
||||
${'✖︎'} | ${'noSCM'}
|
||||
${'✖︎'} | ${'noStackTrace'}
|
||||
${'✔︎'} | ${'notify'}
|
||||
|
|
|
@ -72,6 +72,14 @@ export default (
|
|||
newConfig.coverageReporters = options.coverageReporters;
|
||||
}
|
||||
|
||||
if (options.findRelatedTests !== undefined) {
|
||||
newConfig.findRelatedTests = options.findRelatedTests;
|
||||
}
|
||||
|
||||
if (options.nonFlagArgs !== undefined) {
|
||||
newConfig.nonFlagArgs = options.nonFlagArgs;
|
||||
}
|
||||
|
||||
if (options.noSCM) {
|
||||
newConfig.noSCM = true;
|
||||
}
|
||||
|
|
|
@ -107,7 +107,9 @@ export default function watch(
|
|||
collectCoverageOnlyFrom,
|
||||
coverageDirectory,
|
||||
coverageReporters,
|
||||
findRelatedTests,
|
||||
mode,
|
||||
nonFlagArgs,
|
||||
notify,
|
||||
notifyMode,
|
||||
onlyFailures,
|
||||
|
@ -126,7 +128,9 @@ export default function watch(
|
|||
collectCoverageOnlyFrom,
|
||||
coverageDirectory,
|
||||
coverageReporters,
|
||||
findRelatedTests,
|
||||
mode,
|
||||
nonFlagArgs,
|
||||
notify,
|
||||
notifyMode,
|
||||
onlyFailures,
|
||||
|
|
|
@ -56,6 +56,8 @@ export type AllowedConfigOptions = Partial<
|
|||
| 'collectCoverageOnlyFrom'
|
||||
| 'coverageDirectory'
|
||||
| 'coverageReporters'
|
||||
| 'findRelatedTests'
|
||||
| 'nonFlagArgs'
|
||||
| 'notify'
|
||||
| 'notifyMode'
|
||||
| 'onlyFailures'
|
||||
|
|
Loading…
Reference in New Issue