fix tests for sequence() and polyrhythm()

This commit is contained in:
alex 2022-02-07 19:02:27 +00:00
parent d3f4dcacff
commit 6f9c51db9e

View File

@ -150,19 +150,19 @@ describe('Pattern', function() {
assert.deepStrictEqual(fastcat("a","b","c").rev().firstCycle.sort((a,b) => a.part.begin.sub(b.part.begin)).map(a => a.value), ["c", "b","a"]) assert.deepStrictEqual(fastcat("a","b","c").rev().firstCycle.sort((a,b) => a.part.begin.sub(b.part.begin)).map(a => a.value), ["c", "b","a"])
}) })
}) })
// describe('sequence()', () => { describe('sequence()', () => {
// it('Can work like fastcat', () => { it('Can work like fastcat', () => {
// assert.deepStrictEqual(sequence(1,2,3).firstCycle, fastcat([pure(1), pure(2), pure(3)]).firstCycle) assert.deepStrictEqual(sequence(1,2,3).firstCycle, fastcat(1,2,3).firstCycle)
// }) })
// }) })
// describe('polyrhythm()', () => { describe('polyrhythm()', () => {
// it('Can layer up cycles', () => { it('Can layer up cycles', () => {
// assert.deepStrictEqual( assert.deepStrictEqual(
// polyrhythm(["a","b"],["c"])._sortEventsByPart().firstCycle, polyrhythm(["a","b"],["c"]).firstCycle,
// stack([fastcat(pure("a"),pure("b")),pure("c")])._sortEventsByPart().firstCycle stack(fastcat(pure("a"),pure("b")),pure("c")).firstCycle
// ) )
// }) })
// }) })
describe('every()', () => { describe('every()', () => {
it('Can apply a function every 3rd time', () => { it('Can apply a function every 3rd time', () => {
assert.deepStrictEqual( assert.deepStrictEqual(