Closed jessegreenberg closed 2 years ago
These cases were converted to unit tests in the above commit. They usually pass for me in both chrome and Firefox. But I think they occasionally fail because of the way the stepTimer emits in these tests. Opening a new issue for that: https://github.com/phetsims/utterance-queue/issues/51
@zepumph would you like to review or add any more tests?
Looks really nice. Thanks! If I were writing them, I would have a small preference to get rid of resetQueueAndAnnouncer, and instead make each separate test its own qunit test. That way you can put that logic in beforeEach and all will be good. It seems simpler and would have less code. I didn't want to muck with them if you had opinions though.
Over to you!
I wondered about that - I avoided it because I thought it was trade for more QUnit boilerplate. But coming back I actually strongly prefer it. These tests take forever to run and separating them out into individual tests will let us isolate just a broken test instead of needing to wait for several at a time. Ill break them up.
Tests have been broken up into individual tests for each that required a reset of queue and announcer. Anything else @zepumph?
From https://github.com/phetsims/joist/issues/752, we noted a bunch of cases we want to support with priorityProperty, specifically
A few of these were added in UtteranceQueueTests, lets make sure that they are all in there.