2
0
mirror of https://github.com/tenrok/BBob.git synced 2026-05-15 11:59:37 +03:00
Files
bbob/packages/bbob-parser/parse.test.js
T
2018-06-12 19:07:25 +02:00

34 lines
663 B
JavaScript

const parse = require('./index');
describe('parse', () => {
test('tag with spaces', () => {
const ast = parse('[Verse 2]');
expect(ast).toEqual([{ tag: 'Verse 2', attrs: {}, content: [] }]);
});
// test("pass invalid tags", () => {
// const inputs = [
// '[]',
// '![](image.jpg)',
// 'x html([a. title][, alt][, classes]) x',
// '[/y]',
// '[sc',
// '[sc / [/sc]',
// '[sc arg="val',
// ];
//
// const ast1 = parse(inputs[0]);
//
//
//
// console.log('ast1', ast1);
//
//
//
// expect(ast1).toEqual([
//
// ]);
// })
});