mirror of
https://github.com/eliasstepanik/strudel-docker.git
synced 2026-01-11 13:48:34 +00:00
Add tests
This commit is contained in:
parent
0a408e464a
commit
947b263b9c
@ -46,6 +46,7 @@ import {
|
||||
rev,
|
||||
time,
|
||||
run,
|
||||
binary,
|
||||
pick,
|
||||
stackLeft,
|
||||
stackRight,
|
||||
@ -958,6 +959,18 @@ describe('Pattern', () => {
|
||||
expect(run(4).firstCycle()).toStrictEqual(sequence(0, 1, 2, 3).firstCycle());
|
||||
});
|
||||
});
|
||||
describe('binary', () => {
|
||||
it('Can make a binary pattern from a decimal', () => {
|
||||
expect(binary(55532).firstCycle()).toStrictEqual(
|
||||
sequence(1, 1, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0, 1, 1, 0, 0).firstCycle(),
|
||||
);
|
||||
});
|
||||
it('Can make a binary pattern from a numerical pattern', () => {
|
||||
expect(binary(pure(0x1337)).firstCycle()).toStrictEqual(
|
||||
sequence(0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 1, 1, 1).firstCycle(),
|
||||
);
|
||||
});
|
||||
});
|
||||
describe('ribbon', () => {
|
||||
it('Can ribbon', () => {
|
||||
expect(cat(0, 1, 2, 3, 4, 5, 6, 7).ribbon(2, 4).fast(4).firstCycle()).toStrictEqual(
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user