mirror of
https://github.com/scratchfoundation/scratch-render.git
synced 2025-08-02 01:21:13 -04:00
Even simpler way to check that some thread is active
This commit is contained in:
parent
5579f121a9
commit
ab8fda1655
1 changed files with 1 additions and 2 deletions
|
@ -35,8 +35,7 @@ const testFile = file => test(file, async t => {
|
|||
return Promise.resolve()
|
||||
.then(async () => {
|
||||
// waiting for all threads to complete, then we return
|
||||
|
||||
while (vm.runtime.threads.filter(thread => vm.runtime.isActiveThread(thread)).length > 0) {
|
||||
while (vm.runtime.threads.some(thread => vm.runtime.isActiveThread(thread))) {
|
||||
if ((Date.now() - startTime) >= TIMEOUT) {
|
||||
// if we push the message after end, the failure from tap is not very useful:
|
||||
// "not ok test after end() was called"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue