Skip to content

Commit b3c06ea

Browse files
committed
fix: run timeout after module got loaded
1 parent 34ee308 commit b3c06ea

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/commands/check.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,11 @@ function runRequireJSFileCommand(args: {
271271
}
272272

273273
function runImportJSFileCommand(args: { cwd: string; path: string }) {
274-
return execa("node", ["-e", `import('${args.path}')${timeout}`], {
275-
cwd: args.cwd,
276-
});
274+
return execa(
275+
"node",
276+
["-e", `import('${args.path}').then(() => {${timeout}})`],
277+
{
278+
cwd: args.cwd,
279+
}
280+
);
277281
}

0 commit comments

Comments
 (0)