Skip to content

Commit 9ba11d0

Browse files
committed
✨ change execution logic to IIFE
1 parent 7379639 commit 9ba11d0

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/command/test.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,9 @@ export default async function test(source: string, options: TestOptions) {
4343

4444
try {
4545
console.time(`tc-${i}`);
46-
eval(newCode);
46+
(() => {
47+
eval(newCode);
48+
})();
4749
console.timeEnd(`tc-${i}`);
4850
} catch (e) {
4951
console.log = originalLog;

0 commit comments

Comments
 (0)