parent
d5ab391a98
commit
00b0341839
3 changed files with 15 additions and 7 deletions
|
|
@ -52,6 +52,7 @@ import {
|
|||
stackCentre,
|
||||
s_cat,
|
||||
calculateTactus,
|
||||
sometimes,
|
||||
} from '../index.mjs';
|
||||
|
||||
import { steady } from '../signal.mjs';
|
||||
|
|
@ -1253,4 +1254,13 @@ describe('Pattern', () => {
|
|||
expect(s('bev').chop(8).loopAt(2).tactus).toStrictEqual(Fraction(4));
|
||||
});
|
||||
});
|
||||
describe('sometimes', () => {
|
||||
it('works with constant functions', () => {
|
||||
expect(
|
||||
pure('a')
|
||||
.sometimes((x) => pure('b'))
|
||||
.fast(16).firstCycleValues.length,
|
||||
).toStrictEqual(16);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue