mirror of
https://codeberg.org/uzu/strudel
synced 2026-08-15 09:38:28 -04:00
Add tests for randrun and negative time test for run
This commit is contained in:
@@ -46,6 +46,7 @@ import {
|
||||
rev,
|
||||
time,
|
||||
run,
|
||||
randrun,
|
||||
binaryN,
|
||||
pick,
|
||||
stackLeft,
|
||||
@@ -982,6 +983,17 @@ describe('Pattern', () => {
|
||||
it('Can run', () => {
|
||||
expect(run(4).firstCycle()).toStrictEqual(sequence(0, 1, 2, 3).firstCycle());
|
||||
});
|
||||
it('Can go into negative time', () => {
|
||||
expect(run(4).late(1).firstCycle()).toStrictEqual(sequence(0, 1, 2, 3).firstCycle());
|
||||
});
|
||||
});
|
||||
describe('randrun', () => {
|
||||
it('Can randrun', () => {
|
||||
expect(randrun(4).firstCycle()).toStrictEqual(sequence(2, 1, 3, 0).firstCycle());
|
||||
});
|
||||
it('Can go into negative time', () => {
|
||||
expect(randrun(4).late(1).firstCycle()).toStrictEqual(sequence(1, 2, 0, 3).firstCycle());
|
||||
});
|
||||
});
|
||||
describe('binaryN', () => {
|
||||
it('Can make a binary pattern from a decimal', () => {
|
||||
|
||||
Reference in New Issue
Block a user