codeformat

This commit is contained in:
Kaspars 2024-05-08 00:00:58 +02:00
parent a5b6022506
commit 4e6d39666a
2 changed files with 8 additions and 8 deletions

View file

@ -32,10 +32,10 @@ describe('tonal', () => {
});
it('scale with n and note values', () => {
expect(
n(0, 1, 2)
.note(3, 4, 5)
.scale('C major')
.firstCycleValues.map((h) => h.note),
n(0, 1, 2)
.note(3, 4, 5)
.scale('C major')
.firstCycleValues.map((h) => h.note),
).toEqual(['F3', 'G3', 'A3']);
});
it('scale with colon', () => {
@ -47,9 +47,9 @@ describe('tonal', () => {
});
it('scale without tonic', () => {
expect(
n(0, 1, 2)
.scale('major')
.firstCycleValues.map((h) => h.note),
n(0, 1, 2)
.scale('major')
.firstCycleValues.map((h) => h.note),
).toEqual(['C3', 'D3', 'E3']);
});
it('scale with mininotation colon', () => {

View file

@ -199,7 +199,7 @@ export const scale = register(
pat
.fmap((value) => {
const isObject = typeof value === 'object';
let step = isObject ? (value.note ?? value.n) : value;
let step = isObject ? value.note ?? value.n : value;
if (isNote(step)) {
// legacy..
return pure(step);