@@ -17,14 +17,15 @@ describe("plugin", () => {
1717 inputFile : string ;
1818 } ;
1919
20- ( [
20+ const testCases : ReadonlyArray < TestCaseParams > = [
2121 { resolvedPath : "./addon-1.node" , originalPath : "./addon-1.node" , inputFile : "./addon-1.js" } ,
2222 { resolvedPath : "./addon-2.node" , originalPath : "./addon-2.node" , inputFile : "./addon-2.js" } ,
2323 { resolvedPath : "./addon-1.node" , originalPath : "../addon-1.node" , inputFile : "./sub-directory/addon-1.js" } ,
2424 { resolvedPath : "./addon-2.node" , originalPath : "../addon-2.node" , inputFile : "./sub-directory-3/addon-outside.js" } ,
2525 { resolvedPath : "./addon-1.node" , originalPath : "addon-1" , inputFile : "./addon-1-bindings.js" } ,
2626 { resolvedPath : undefined , originalPath : "./addon-1.js" , inputFile : "./require-js-file.js" } ,
27- ] as TestCaseParams [ ] ) . forEach ( ( { resolvedPath, originalPath, inputFile } ) => {
27+ ] ;
28+ for ( const { resolvedPath, originalPath, inputFile } of testCases ) {
2829 const expectedMessage = resolvedPath
2930 ? `transform to requireNodeAddon() with "${ resolvedPath } "`
3031 : "NOT transform to requireNodeAddon()" ;
@@ -80,7 +81,7 @@ describe("plugin", () => {
8081 ) ;
8182 }
8283 } ) ;
83- } ) ;
84+ }
8485 } ) ;
8586
8687 it ( "transforms require calls to packages with native entry point" , ( context ) => {
0 commit comments