Skip to content
This repository has been archived by the owner on Oct 18, 2023. It is now read-only.

Commit

Permalink
test: refactor to use finally
Browse files Browse the repository at this point in the history
  • Loading branch information
privatenumber committed Sep 20, 2023
1 parent ba2543d commit f06cd4e
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions tests/utils/node-with-loader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,17 +105,17 @@ export async function createNode(
`,
);

const nodeProcess = await nodeWithLoader({
args: [
importerFileName,
],
nodePath: node.path,
cwd: fixturePath,
});

await fs.rm(importerFilePath);

return nodeProcess;
try {
return await nodeWithLoader({
args: [
importerFileName,
],
nodePath: node.path,
cwd: fixturePath,
});
} finally {
await fs.rm(importerFilePath);
}
},
require(
filePath: string,
Expand Down

0 comments on commit f06cd4e

Please sign in to comment.