66 */
77
88import { wrap } from 'jest-snapshot-serializer-raw' ;
9- import { onNodeVersions } from '@jest/test-utils' ;
109import runJest , { runContinuous } from '../runJest' ;
1110
1211try {
@@ -82,16 +81,14 @@ it('does not report crypto random data', () => {
8281 expect ( textAfterTest ) . toBe ( '' ) ;
8382} ) ;
8483
85- onNodeVersions ( '>=12' , ( ) => {
86- it ( 'does not report ELD histograms' , ( ) => {
87- const { stderr} = runJest ( 'detect-open-handles' , [
88- 'histogram' ,
89- '--detectOpenHandles' ,
90- ] ) ;
91- const textAfterTest = getTextAfterTest ( stderr ) ;
84+ it ( 'does not report ELD histograms' , ( ) => {
85+ const { stderr} = runJest ( 'detect-open-handles' , [
86+ 'histogram' ,
87+ '--detectOpenHandles' ,
88+ ] ) ;
89+ const textAfterTest = getTextAfterTest ( stderr ) ;
9290
93- expect ( textAfterTest ) . toBe ( '' ) ;
94- } ) ;
91+ expect ( textAfterTest ) . toBe ( '' ) ;
9592} ) ;
9693
9794describe ( 'notify' , ( ) => {
@@ -110,17 +107,15 @@ describe('notify', () => {
110107 } ) ;
111108} ) ;
112109
113- onNodeVersions ( '>=12' , ( ) => {
114- it ( 'does not report timeouts using unref' , ( ) => {
115- // The test here is basically that it exits cleanly without reporting anything (does not need `until`)
116- const { stderr} = runJest ( 'detect-open-handles' , [
117- 'unref' ,
118- '--detectOpenHandles' ,
119- ] ) ;
120- const textAfterTest = getTextAfterTest ( stderr ) ;
110+ it ( 'does not report timeouts using unref' , ( ) => {
111+ // The test here is basically that it exits cleanly without reporting anything (does not need `until`)
112+ const { stderr} = runJest ( 'detect-open-handles' , [
113+ 'unref' ,
114+ '--detectOpenHandles' ,
115+ ] ) ;
116+ const textAfterTest = getTextAfterTest ( stderr ) ;
121117
122- expect ( textAfterTest ) . toBe ( '' ) ;
123- } ) ;
118+ expect ( textAfterTest ) . toBe ( '' ) ;
124119} ) ;
125120
126121it ( 'prints out info about open handlers from inside tests' , async ( ) => {
0 commit comments