chore: default reportSlowTests to 5 minutes (#34950)
This commit is contained in:
parent
70cc2b14e2
commit
08ea36caa2
|
@ -93,8 +93,8 @@ See [`property: TestConfig.reporter`].
|
|||
## property: FullConfig.reportSlowTests
|
||||
* since: v1.10
|
||||
- type: <[null]|[Object]>
|
||||
- `max` <[int]> The maximum number of slow test files to report. Defaults to `5`.
|
||||
- `threshold` <[float]> Test duration in milliseconds that is considered slow. Defaults to 15 seconds.
|
||||
- `max` <[int]> The maximum number of slow test files to report.
|
||||
- `threshold` <[float]> Test file duration in milliseconds that is considered slow.
|
||||
|
||||
See [`property: TestConfig.reportSlowTests`].
|
||||
|
||||
|
|
|
@ -429,7 +429,7 @@ export default defineConfig({
|
|||
* since: v1.10
|
||||
- type: ?<[null]|[Object]>
|
||||
- `max` <[int]> The maximum number of slow test files to report. Defaults to `5`.
|
||||
- `threshold` <[float]> Test duration in milliseconds that is considered slow. Defaults to 15 seconds.
|
||||
- `threshold` <[float]> Test file duration in milliseconds that is considered slow. Defaults to 5 minutes.
|
||||
|
||||
Whether to report slow test files. Pass `null` to disable this feature.
|
||||
|
||||
|
|
|
@ -99,7 +99,7 @@ export class FullConfigInternal {
|
|||
metadata: userConfig.metadata,
|
||||
preserveOutput: takeFirst(userConfig.preserveOutput, 'always'),
|
||||
reporter: takeFirst(configCLIOverrides.reporter, resolveReporters(userConfig.reporter, configDir), [[defaultReporter]]),
|
||||
reportSlowTests: takeFirst(userConfig.reportSlowTests, { max: 5, threshold: 15000 }),
|
||||
reportSlowTests: takeFirst(userConfig.reportSlowTests, { max: 5, threshold: 300_000 /* 5 minutes */ }),
|
||||
quiet: takeFirst(configCLIOverrides.quiet, userConfig.quiet, false),
|
||||
projects: [],
|
||||
shard: takeFirst(configCLIOverrides.shard, userConfig.shard, null),
|
||||
|
|
|
@ -605,7 +605,7 @@ export const baseFullConfig: reporterTypes.FullConfig = {
|
|||
preserveOutput: 'always',
|
||||
projects: [],
|
||||
reporter: [[process.env.CI ? 'dot' : 'list']],
|
||||
reportSlowTests: { max: 5, threshold: 15000 },
|
||||
reportSlowTests: { max: 5, threshold: 300_000 /* 5 minutes */ },
|
||||
configFile: '',
|
||||
rootDir: '',
|
||||
quiet: false,
|
||||
|
|
|
@ -1443,7 +1443,7 @@ interface TestConfig<TestArgs = {}, WorkerArgs = {}> {
|
|||
max: number;
|
||||
|
||||
/**
|
||||
* Test duration in milliseconds that is considered slow. Defaults to 15 seconds.
|
||||
* Test file duration in milliseconds that is considered slow. Defaults to 5 minutes.
|
||||
*/
|
||||
threshold: number;
|
||||
};
|
||||
|
@ -1895,12 +1895,12 @@ export interface FullConfig<TestArgs = {}, WorkerArgs = {}> {
|
|||
*/
|
||||
reportSlowTests: null|{
|
||||
/**
|
||||
* The maximum number of slow test files to report. Defaults to `5`.
|
||||
* The maximum number of slow test files to report.
|
||||
*/
|
||||
max: number;
|
||||
|
||||
/**
|
||||
* Test duration in milliseconds that is considered slow. Defaults to 15 seconds.
|
||||
* Test file duration in milliseconds that is considered slow.
|
||||
*/
|
||||
threshold: number;
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue