Tests to be added (list to be updated, and issues can be created in the future for cases I've missed):
Integration Tests
Player
[x] Player bounces from surface
[x] Player falls down faster if space is held
[x] Player can move left
[x] Player can move right
[x] Player can stick to ground when fast falling
[x] Jump height is increased when player fast falls and releases when on ground
[x] Player eventually falls to ground after charged jump
[ ] Player can collect pickup
[ ] Player is knocked back when hitting falling obstacle
[x] ~Player cannot move past horizontal boundaries~ will be covered under Level
Background
[x] Background scrolls down as player goes up
[x] Background loads new tile if scrolled down past threshold
Lava
[x] Lava moves up
[x] Lava can be sped up
[x] Lava can be slowed down temporarily
[x] Lava speed is increased when further away from player
Moving Blocks
[x] Block can move horizontally
[ ] Block's horizontal speed is reversed when hitting side of game's dimensions
Block Chunks
[ ] Blocks can be generated from chunk
[ ] Different chunk types can be selected when creating chunk
[ ] Chunk despawns when all blocks in chunk pass bottom of camera by theshold
Falling Obstacles
[ ] Obstacle can fall down
[ ] Obstacle despawns when it passes bottom of camera by threshold
[ ] Obstacle spawns above top of camera
Score System
[ ] Score can be updated
[ ] Score update is triggered when player moves up past threshold
[ ] High score is updated when score surpasses high score
[ ] High score is saved to local storage
Game Over
[ ] Displays "Game Over" text
[ ] If user beats high score, high score message appears
[ ] If user does not beat high score, high score message won't appear
[ ] Displays button to play again
[ ] Game is able to restart when play again button is clicked
Level
[ ] Player cannot move past left bounds
[ ] Player cannot move past right bounds
Unit Tests
ChunkHelper
randomOffset
[ ] Returns lowest offset
[ ] Returns highest offset
[ ] Returns an offset between lowest and highest offsets
randomSpeed
[ ] Returns lowest speed
[ ] Returns highest speed
[ ] Returns a speed between lowest and highest speed
[ ] Returns negative speed if sign is flipped
Remainder of classes TDB since the rest of them rely on Phaser constructs, and it's not certain how difficult it'll be to mock out Phaser functionality to be worth it.
Tests to be added (list to be updated, and issues can be created in the future for cases I've missed):
Integration Tests
Player
Background
Lava
Moving Blocks
Block Chunks
Falling Obstacles
Score System
Game Over
Level
Unit Tests
ChunkHelper
randomOffset
randomSpeed
Remainder of classes TDB since the rest of them rely on Phaser constructs, and it's not certain how difficult it'll be to mock out Phaser functionality to be worth it.