[Test] Add MFM test

This commit is contained in:
syuilo 2019-01-31 14:31:25 +09:00
parent 5c52db9f35
commit 6b99e1695c

View file

@ -277,6 +277,22 @@ describe('MFM', () => {
]);
});
it('multi', () => {
const tokens = parse('<spin>:foo:</spin><spin>:foo:</spin>');
assert.deepStrictEqual(tokens, [
tree('spin', [
leaf('emoji', { name: 'foo' })
], {
attr: 'left'
}),
tree('spin', [
leaf('emoji', { name: 'foo' })
], {
attr: 'left'
}),
]);
});
it('nested', () => {
const tokens = parse('<spin><spin>:foo:</spin></spin>');
assert.deepStrictEqual(tokens, [