Test and fix chop / squeezebind

This commit is contained in:
alex 2022-04-12 12:16:02 +01:00
parent 83c9200e7d
commit 51db0eaf40
2 changed files with 22 additions and 1 deletions

View file

@ -507,4 +507,16 @@ describe('Pattern', function() {
)
})
})
describe("chop", () => {
it("Can chop(2)", () => {
assert.deepStrictEqual(
sequence({sound: "a"}, {sound: "b"})._chop(2).firstCycle(),
sequence({sound: "a", begin: 0, end: 0.5},
{sound: "a", begin: 0.5, end: 1},
{sound: "b", begin: 0, end: 0.5},
{sound: "b", begin: 0.5, end: 1}
).firstCycle()
);
});
})
})