@jest/test-sequencer
Advanced tools
Comparing version 29.6.4 to 29.7.0
@@ -12,5 +12,9 @@ /** | ||
declare type Cache_2 = { | ||
[key: string]: [0 | 1, number] | undefined; | ||
[key: string]: | ||
| [testStatus: typeof FAIL | typeof SUCCESS, testDuration: number] | ||
| undefined; | ||
}; | ||
declare const FAIL = 0; | ||
export declare type ShardOptions = { | ||
@@ -21,2 +25,4 @@ shardIndex: number; | ||
declare const SUCCESS = 1; | ||
/** | ||
@@ -23,0 +29,0 @@ * The TestSequencer will ultimately decide which tests should run first. |
@@ -244,3 +244,3 @@ 'use strict'; | ||
if (failedA !== failedB) { | ||
return failedA === true ? -1 : 1; | ||
return failedA ? -1 : 1; | ||
} else if (hasTimeA != (testB.duration != null)) { | ||
@@ -257,6 +257,3 @@ // If only one of two tests has timing information, run it last | ||
allFailedTests(tests) { | ||
const hasFailed = (cache, test) => cache[test.path]?.[0] === FAIL; | ||
return this.sort( | ||
tests.filter(test => hasFailed(this._getCache(test), test)) | ||
); | ||
return this.sort(tests.filter(test => this.hasFailed(test))); | ||
} | ||
@@ -271,5 +268,7 @@ cacheResults(tests, results) { | ||
const perf = testResult.perfStats; | ||
const testRuntime = | ||
perf.runtime ?? test.duration ?? perf.end - perf.start; | ||
cache[testResult.testFilePath] = [ | ||
testResult.numFailingTests ? FAIL : SUCCESS, | ||
perf.runtime || 0 | ||
testResult.numFailingTests > 0 ? FAIL : SUCCESS, | ||
testRuntime || 0 | ||
]; | ||
@@ -276,0 +275,0 @@ } |
{ | ||
"name": "@jest/test-sequencer", | ||
"version": "29.6.4", | ||
"version": "29.7.0", | ||
"repository": { | ||
@@ -20,9 +20,9 @@ "type": "git", | ||
"dependencies": { | ||
"@jest/test-result": "^29.6.4", | ||
"@jest/test-result": "^29.7.0", | ||
"graceful-fs": "^4.2.9", | ||
"jest-haste-map": "^29.6.4", | ||
"jest-haste-map": "^29.7.0", | ||
"slash": "^3.0.0" | ||
}, | ||
"devDependencies": { | ||
"@jest/test-utils": "^29.6.4", | ||
"@jest/test-utils": "^29.7.0", | ||
"@types/graceful-fs": "^4.1.3" | ||
@@ -36,3 +36,3 @@ }, | ||
}, | ||
"gitHead": "55cd6a0aaf6f9178199dfa7af7a00fcaa7c421fd" | ||
"gitHead": "4e56991693da7cd4c3730dc3579a1dd1403ee630" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
13594
368
Updated@jest/test-result@^29.7.0
Updatedjest-haste-map@^29.7.0