Javenode icon indicating copy to clipboard operation
Javenode copied to clipboard

在测试中使用 setInterval 进程只会打印一次

Open hanChao-IsBigPenisBoy opened this issue 10 months ago • 3 comments

按照官网的测试用例中使用setInterval(() => {\n" + " console.log('---------setInterval-------> ')\n" + " }, 1000); 应该会打印很多次,但是事实上只打印了一次就关闭了,我看文档并没有关于这块的解释,这里是虽然java程序关闭了,但是js文件还是会一直运行吗

hanChao-IsBigPenisBoy avatar Feb 10 '25 06:02 hanChao-IsBigPenisBoy

Image

hanChao-IsBigPenisBoy avatar Feb 10 '25 06:02 hanChao-IsBigPenisBoy

You may await multiple times.

caoccao avatar Feb 10 '25 17:02 caoccao

You may await multiple times.

Thank you, I have a rough idea of the reason

hanChao-IsBigPenisBoy avatar Feb 11 '25 02:02 hanChao-IsBigPenisBoy