drawLine test

This commit is contained in:
Felix Roos 2022-04-23 23:47:52 +02:00
parent 766cccf335
commit 2bbd306b94
2 changed files with 16 additions and 3 deletions

View file

@ -0,0 +1,11 @@
import { fastcat } from '../pattern.mjs';
import { strict as assert } from 'assert';
import drawLine from '../drawLine.mjs';
describe('drawLine', () => {
it('should work', () => {
assert.equal(drawLine(fastcat(0, [1, 2]), 10), '|0-12|0-12');
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');
});
});