mirror of
https://codeberg.org/uzu/strudel
synced 2026-08-08 15:42:56 -04:00
test for #1155
This commit is contained in:
@@ -9,6 +9,10 @@ import '@strudel/core/euclid.mjs';
|
||||
import { Fraction } from '@strudel/core/index.mjs';
|
||||
import { describe, expect, it } from 'vitest';
|
||||
|
||||
const sameFirst = (a, b) => {
|
||||
return expect(a.sortHapsByPart().firstCycle()).toStrictEqual(b.sortHapsByPart().firstCycle());
|
||||
};
|
||||
|
||||
describe('mini', () => {
|
||||
const minV = (v) => mini(v).sortHapsByPart().firstCycleValues;
|
||||
const minS = (v) => mini(v).sortHapsByPart().showFirstCycle;
|
||||
@@ -219,6 +223,9 @@ describe('mini', () => {
|
||||
expect(mini('[^a b c] [d [^e f]]').tactus).toEqual(Fraction(24));
|
||||
expect(mini('[^a b c d e]').tactus).toEqual(Fraction(5));
|
||||
});
|
||||
it('Can repeat expansions', () => {
|
||||
sameFirst(mini('a@2!2 b'), mini('a@2 a@2 b'));
|
||||
});
|
||||
});
|
||||
|
||||
describe('getLeafLocation', () => {
|
||||
|
||||
Reference in New Issue
Block a user