[Test] Add MFM test

This commit is contained in:
syuilo 2019-01-31 14:31:25 +09:00
parent fdcc994291
commit e4c745bccd
No known key found for this signature in database
GPG key ID: BDC4C49D06AB9D69

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, [