Skip to content

Commit d50a2e7

Browse files
test(rhythmruler): add comprehensive unit tests for RhythmRuler widget
- Added js/widgets/rhythmruler.test.js with ~40 tests coverage: - Constructor & initialization - State management & undo functionality - Note width calculation (validates layout scaling) - Rhythm manipulation (dissect, save history) - Playback state tracking - Added module.exports to rhythmruler.js for Jest compatibility - Used proper mocking pattern for window/document globals
1 parent 0693ea8 commit d50a2e7

File tree

2 files changed

+534
-0
lines changed

2 files changed

+534
-0
lines changed

js/widgets/rhythmruler.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2846,3 +2846,6 @@ class RhythmRuler {
28462846
}
28472847
}
28482848
}
2849+
if (typeof module !== "undefined") {
2850+
module.exports = RhythmRuler;
2851+
}

0 commit comments

Comments
 (0)