mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2025-08-12 22:42:03 -04:00
update runtime thread tests
Threads are now removed after every "inner" step. Any thread that reaches its DONE conditions is immediately removed instead of requiring an extra step to remove it. As such tests that check the number of threads have been updated to consider this.
This commit is contained in:
parent
b833ef8d24
commit
2ffa8eb333
5 changed files with 73 additions and 34 deletions
test/unit
|
@ -181,8 +181,7 @@ test('stepThreads', t => {
|
|||
t.strictEquals(s.stepThreads().length, 0);
|
||||
generateThread(r);
|
||||
t.strictEquals(r.threads.length, 1);
|
||||
t.strictEquals(s.stepThreads().length, 0);
|
||||
r.threads[0].status = Thread.STATUS_RUNNING;
|
||||
// Threads should be marked DONE and removed in the same step they finish.
|
||||
t.strictEquals(s.stepThreads().length, 1);
|
||||
|
||||
t.end();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue