File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44
55### Fixes
66
7+ - ` [expect] ` Remove ` @types/node ` from dependencies ([ #14385 ] ( https://github.com/jestjs/jest/pull/14385 ) )
78- ` [jest-reporters] ` Update ` istanbul-lib-instrument ` dependency to v6. ([ #14401 ] ( https://github.com/jestjs/jest/pull/14401 ) )
89
910### Chore & Maintenance
Original file line number Diff line number Diff line change 2020 },
2121 "dependencies" : {
2222 "@jest/expect-utils" : " workspace:^" ,
23- "@types/node" : " *" ,
2423 "jest-get-type" : " workspace:^" ,
2524 "jest-matcher-utils" : " workspace:^" ,
2625 "jest-message-util" : " workspace:^" ,
Original file line number Diff line number Diff line change 66 *
77 */
88
9- import type { AsyncLocalStorage } from 'async_hooks' ;
109import type { EqualsFunction , Tester } from '@jest/expect-utils' ;
1110import type * as jestMatcherUtils from 'jest-matcher-utils' ;
1211import { INTERNAL_MATCHER_FLAG } from './jestMatchersObject' ;
@@ -58,7 +57,7 @@ export interface MatcherUtils {
5857
5958export interface MatcherState {
6059 assertionCalls : number ;
61- currentConcurrentTestName ?: AsyncLocalStorage < string > ;
60+ currentConcurrentTestName ?: ( ) => string | undefined ;
6261 currentTestName ?: string ;
6362 error ?: Error ;
6463 expand ?: boolean ;
Original file line number Diff line number Diff line change @@ -137,7 +137,9 @@ function collectConcurrentTests(
137137function startTestsConcurrently ( concurrentTests : Array < ConcurrentTestEntry > ) {
138138 const mutex = pLimit ( getState ( ) . maxConcurrency ) ;
139139 const testNameStorage = new AsyncLocalStorage < string > ( ) ;
140- jestExpect . setState ( { currentConcurrentTestName : testNameStorage } ) ;
140+ jestExpect . setState ( {
141+ currentConcurrentTestName : ( ) => testNameStorage . getStore ( ) ,
142+ } ) ;
141143 for ( const test of concurrentTests ) {
142144 try {
143145 const testFn = test . fn ;
Original file line number Diff line number Diff line change @@ -281,7 +281,7 @@ const _toMatchSnapshot = (config: MatchSnapshotConfig) => {
281281
282282 const { currentConcurrentTestName, isNot, snapshotState} = context ;
283283 const currentTestName =
284- currentConcurrentTestName ?. getStore ( ) ?? context . currentTestName ;
284+ currentConcurrentTestName ?.( ) ?? context . currentTestName ;
285285
286286 if ( isNot ) {
287287 throw new Error (
Original file line number Diff line number Diff line change @@ -9776,7 +9776,6 @@ __metadata:
97769776 "@jest/expect-utils": "workspace:^"
97779777 "@jest/test-utils": "workspace:^"
97789778 "@tsd/typescript": ^5.0.4
9779- "@types/node": "*"
97809779 chalk: ^4.0.0
97819780 immutable: ^4.0.0
97829781 jest-get-type: "workspace:^"
You can’t perform that action at this time.
0 commit comments