File tree Expand file tree Collapse file tree 2 files changed +10
-4
lines changed
Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change 1- // Using dynamic imports for ESM compatibility
2- import 'cli-testing-library/extend-expect' ;
1+ // Using Node.js module interop for ESM/CommonJS compatibility
2+ import { createRequire } from 'module' ;
3+
4+ // Create a require function scoped to this module
5+ const moduleRequire = createRequire ( import . meta. url ) ;
6+
7+ // Use the scoped require to import CommonJS modules
8+ moduleRequire ( 'cli-testing-library/extend-expect' ) ;
39import { configure } from 'cli-testing-library' ;
410import { jest } from '@jest/globals' ;
511
Original file line number Diff line number Diff line change 33 "target" : " ES2020" ,
44 "lib" : [" ES6" , " ES2020" ],
55
6- "module" : " CommonJS " ,
6+ "module" : " NodeNext " ,
77
88 "resolveJsonModule" : true ,
9- "moduleResolution" : " Node " ,
9+ "moduleResolution" : " NodeNext " ,
1010
1111 "allowJs" : true ,
1212
You can’t perform that action at this time.
0 commit comments