Commit c176444
committed
test(project-manager): expand unit coverage to 72.79% statement coverage
Add 27 new test groups covering previously untested paths:
- doLoadAnimation counter wrap (line 82)
- _loadStart removeBadSessionKey exception handling
- _loadProject 2500ms timeout body, textMsg error, missing planet methods,
__functionload branch (run:true, firstRun:true)
- _doLoad with no argument
- prepareExport: null block, temperament1, nopValueBlock, matrixData, wrapmode
- saveLocally: allProjects setter error, thumbnail Image.onload, canvas error
- _midiImportBlocks: confirm button presence, cancel button click
- _setupFileHandlers: click handler, change handler (null/MIDI/error/no-file)
- start() URL parameter parsing: fix window.history.replaceState approach,
single-param id, multi-param id, callback scheduling, unknown param
Fixes window.location mocking to use window.history.replaceState (jsdom 26
window.location is non-configurable; delete and Object.defineProperty both
fail silently). Statement coverage: 53.12% -> 72.79%.
Signed-off-by: Vanshika <pahalvanshikaa@gmail.com>1 parent 3b2f36d commit c176444
1 file changed
Lines changed: 680 additions & 27 deletions
0 commit comments