Skip to content

Commit 64b967c

Browse files
author
Mariusz Pasinski
committed
chore: replace [].forEach() with for-of
1 parent f2bfc83 commit 64b967c

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

packages/host/src/node/babel-plugin/plugin.test.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)