test: add test for multi-line code block

This commit is contained in:
syuilo 2021-03-30 10:39:08 +09:00
parent 1b4aeb0fe7
commit f28c9ed86f

View file

@ -151,6 +151,11 @@ describe('code block', () => {
const output = [CODE_BLOCK('abc', null)];
assert.deepStrictEqual(parse(input), output);
});
it('multi line', () => {
const input = '```\na\nb\nc\n```';
const output = [CODE_BLOCK('a\nb\nc', null)];
assert.deepStrictEqual(parse(input), output);
});
it('basic (lang)', () => {
const input = '```js\nconst a = 1;\n```';
const output = [CODE_BLOCK('const a = 1;', 'js')];