test silence

This commit is contained in:
Felix Roos 2022-04-24 00:59:38 +02:00
parent a0d6fc47e0
commit 58a936cf33

View File

@ -1,4 +1,4 @@
import { fastcat, stack, slowcat } from '../pattern.mjs';
import { fastcat, stack, slowcat, silence } from '../pattern.mjs';
import { strict as assert } from 'assert';
import drawLine from '../drawLine.mjs';
@ -13,6 +13,9 @@ describe('drawLine', () => {
assert.equal(drawLine(fastcat(0, [1, 2, 3]), 10), '|0--123|0--123');
assert.equal(drawLine(fastcat(0, 1, [2, 3]), 10), '|0-1-23|0-1-23');
});
it('supports unequal silence', () => {
assert.equal(drawLine(fastcat(0, silence, [1, 2]), 10), '|0-..12|0-..12');
});
it('supports multiple lines', () => {
assert.equal(
drawLine(fastcat(0, stack(1, 2)), 10),