@@ -76,29 +76,26 @@ describe("typescript commonjs configuration", () => {
7676 expect ( existsSync ( resolve ( __dirname , "dist/foo.bundle.js" ) ) ) . toBeTruthy ( ) ;
7777 } ) ;
7878
79- it ( "should support typescript commonjs configuration (using `interpret`)" , async ( ) => {
80- const [ major ] = process . versions . node . split ( "." ) . map ( Number ) ;
81- const { exitCode, stderr, stdout } = await run ( __dirname , [ "-c" , "./webpack.config.ts" ] , {
82- nodeOptions : [
83- // Disable typescript strip types for tests
84- ...( major >= 22
85- ? [
86- "--no-experimental-strip-types" ,
87- // avoid problems with nyc
88- "--import=ts-node/register" ,
89- ]
90- : [
91- // avoid problems with nyc
92- "--import=ts-node/register" ,
93- ] ) ,
94- ] ,
95- } ) ;
79+ const [ major ] = process . versions . node . split ( "." ) . map ( Number ) ;
9680
97- console . log ( stdout ) ;
81+ // Due to problems with nyc
82+ ( major >= 22 ? it : it . skip ) (
83+ "should support typescript commonjs configuration (using `interpret`)" ,
84+ async ( ) => {
85+ const { exitCode, stderr, stdout } = await run ( __dirname , [ "-c" , "./webpack.config.ts" ] , {
86+ nodeOptions : [
87+ "--no-experimental-strip-types" ,
88+ // avoid problems with nyc
89+ "--import=ts-node/register" ,
90+ ] ,
91+ } ) ;
9892
99- expect ( stderr ) . toBeFalsy ( ) ;
100- expect ( stdout ) . toBeTruthy ( ) ;
101- expect ( exitCode ) . toBe ( 0 ) ;
102- expect ( existsSync ( resolve ( __dirname , "dist/foo.bundle.js" ) ) ) . toBeTruthy ( ) ;
103- } ) ;
93+ /* eslint-disable jest/no-standalone-expect */
94+ expect ( stderr ) . toBeFalsy ( ) ;
95+ expect ( stdout ) . toBeTruthy ( ) ;
96+ expect ( exitCode ) . toBe ( 0 ) ;
97+ expect ( existsSync ( resolve ( __dirname , "dist/foo.bundle.js" ) ) ) . toBeTruthy ( ) ;
98+ /* eslint-enable jest/no-standalone-expect */
99+ } ,
100+ ) ;
104101} ) ;
0 commit comments