File tree 6 files changed +6
-6
lines changed 6 files changed +6
-6
lines changed Original file line number Diff line number Diff line change 4
4
5
5
### Fixes
6
6
7
+ - ` [expect] ` Remove ` @types/node ` from dependencies ([ #14385 ] ( https://github.com/jestjs/jest/pull/14385 ) )
7
8
- ` [jest-reporters] ` Update ` istanbul-lib-instrument ` dependency to v6. ([ #14401 ] ( https://github.com/jestjs/jest/pull/14401 ) )
8
9
9
10
### Chore & Maintenance
Original file line number Diff line number Diff line change 20
20
},
21
21
"dependencies" : {
22
22
"@jest/expect-utils" : " workspace:^" ,
23
- "@types/node" : " *" ,
24
23
"jest-get-type" : " workspace:^" ,
25
24
"jest-matcher-utils" : " workspace:^" ,
26
25
"jest-message-util" : " workspace:^" ,
Original file line number Diff line number Diff line change 6
6
*
7
7
*/
8
8
9
- import type { AsyncLocalStorage } from 'async_hooks' ;
10
9
import type { EqualsFunction , Tester } from '@jest/expect-utils' ;
11
10
import type * as jestMatcherUtils from 'jest-matcher-utils' ;
12
11
import { INTERNAL_MATCHER_FLAG } from './jestMatchersObject' ;
@@ -58,7 +57,7 @@ export interface MatcherUtils {
58
57
59
58
export interface MatcherState {
60
59
assertionCalls : number ;
61
- currentConcurrentTestName ?: AsyncLocalStorage < string > ;
60
+ currentConcurrentTestName ?: ( ) => string | undefined ;
62
61
currentTestName ?: string ;
63
62
error ?: Error ;
64
63
expand ?: boolean ;
Original file line number Diff line number Diff line change @@ -137,7 +137,9 @@ function collectConcurrentTests(
137
137
function startTestsConcurrently ( concurrentTests : Array < ConcurrentTestEntry > ) {
138
138
const mutex = pLimit ( getState ( ) . maxConcurrency ) ;
139
139
const testNameStorage = new AsyncLocalStorage < string > ( ) ;
140
- jestExpect . setState ( { currentConcurrentTestName : testNameStorage } ) ;
140
+ jestExpect . setState ( {
141
+ currentConcurrentTestName : ( ) => testNameStorage . getStore ( ) ,
142
+ } ) ;
141
143
for ( const test of concurrentTests ) {
142
144
try {
143
145
const testFn = test . fn ;
Original file line number Diff line number Diff line change @@ -281,7 +281,7 @@ const _toMatchSnapshot = (config: MatchSnapshotConfig) => {
281
281
282
282
const { currentConcurrentTestName, isNot, snapshotState} = context ;
283
283
const currentTestName =
284
- currentConcurrentTestName ?. getStore ( ) ?? context . currentTestName ;
284
+ currentConcurrentTestName ?.( ) ?? context . currentTestName ;
285
285
286
286
if ( isNot ) {
287
287
throw new Error (
Original file line number Diff line number Diff line change @@ -9776,7 +9776,6 @@ __metadata:
9776
9776
"@jest/expect-utils": "workspace:^"
9777
9777
"@jest/test-utils": "workspace:^"
9778
9778
"@tsd/typescript": ^5.0.4
9779
- "@types/node": "*"
9780
9779
chalk: ^4.0.0
9781
9780
immutable: ^4.0.0
9782
9781
jest-get-type: "workspace:^"
You can’t perform that action at this time.
0 commit comments