Skip to content

Commit

Permalink
fix: run timeout after module got loaded
Browse files Browse the repository at this point in the history
  • Loading branch information
n1ru4l committed Jun 24, 2022
1 parent 34ee308 commit b3c06ea
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/commands/check.ts
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,11 @@ function runRequireJSFileCommand(args: {
}

function runImportJSFileCommand(args: { cwd: string; path: string }) {
return execa("node", ["-e", `import('${args.path}')${timeout}`], {
cwd: args.cwd,
});
return execa(
"node",
["-e", `import('${args.path}').then(() => {${timeout}})`],
{
cwd: args.cwd,
}
);
}

0 comments on commit b3c06ea

Please sign in to comment.