Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions js/songs.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions tests/run-tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -318,8 +318,8 @@ runTest('Defaults to ["g"] if no valid instruments provided', () => {
// If instr: ['invalid'], filter returns [], but .length check was on ORIGINAL s.instr.
// Wait: s.instr.length is 1. filter returns []. So it returns [].
// This looks like a bug in validateSong implementation if it wants to ensure at least one valid instrument.
// But I must test the CURRENT code.
assertArrayEqual(validateSong({instr: ['invalid']}).instr, []);
// Fix: Check filtered array length instead.
assertArrayEqual(validateSong({instr: ['invalid']}).instr, ['g']);
// If instr: 'not-an-array', Array.isArray is false, returns ['g']
assertArrayEqual(validateSong({instr: 'not-an-array'}).instr, ['g']);
});
Expand Down
Loading