While playing with p5, I've found, that you are using the function $(window).trigger(key()) to simulate the keyboard events in the Qunit tests.
IMHO, its bit verbose, and the trigger function and keydown event function is duplicated for each key press.
So, I've refactored the keyboard simulation to a separate "fakeKeyboard.js" file and it resulted in a cleaner way (In my perspective) to do the same via functions like "fakeKeyboard.pressRightArrow(keyPressCount)".
I've just done this for my learning purpose. Kindly accept this pull request, if it make sense and appropriate to you.
Tamizhvendan S | http://sweettam.blogspot.com
Fake Keyboard added to simulate keyboard events
Deleted the temp file and added intendation to tests.js
This is beautiful work, thank you! Accepting ASAP.
Thanks Scott :-)