Skip to content

Commit

Permalink
Merge pull request #620 from no-chris/add-more-time-signatures
Browse files Browse the repository at this point in the history
add support for more time signatures
  • Loading branch information
no-chris committed Feb 26, 2023
2 parents 1c6352e + f76f699 commit beb7140
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,12 +1,20 @@
const allowedTimeSignatures = [
'2/2',
'3/2',
'4/2',
'2/4',
'3/4',
'4/4',
'5/4',
'6/4',
'7/4',
'9/4',
'10/4',
'3/8',
'4/8',
'5/8',
'6/8',
'7/8',
'9/8',
'12/8',
];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,28 @@ describe('isTimeSignatureString', () => {
describe.each([
['2/2', true],
['3/2', true],
['4/2', true],

['2/4', true],
['3/4', true],
['4/4', true],
['5/4', true],
['6/4', true],
['7/4', true],
['9/4', true],
['10/4', true],

['3/8', true],
['5/8', true],
['6/8', true],
['7/8', true],
['9/8', true],
['12/8', true],

[' 4/4', false],
['4/4 ', false],
[' 4/4 ', false],

['5/2', false],
['3/3', false],
['13/8', false],
])('Time signature string %s', (tsString, result) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ describe.each([
});
});

describe.each([['2/1'], ['3/1'], ['5/8'], ['13/7']])(
describe.each([['2/1'], ['3/1'], ['11/8'], ['13/7']])(
'Invalid time signature of %s',
(string) => {
test('Throws TypeError', () => {
Expand Down

0 comments on commit beb7140

Please sign in to comment.