Add some MFM tests

This commit is contained in:
syuilo 2019-06-16 21:26:43 +09:00
parent 49d57ce049
commit b134467bd3
No known key found for this signature in database
GPG key ID: BDC4C49D06AB9D69

View file

@ -1173,6 +1173,24 @@ describe('MFM', () => {
text('foo_bar_baz'), text('foo_bar_baz'),
]); ]);
}); });
it('require spaces', () => {
const tokens = parse('湊おじたん@日目_L38b #pixiv https://www.pixiv.net/member_illust.php');
assert.deepStrictEqual(tokens, [
text('湊おじたん@日目_L38b #pixiv https://www.pixiv.net/member_illust.php'),
]);
});
it('newline sandwich', () => {
const tokens = parse('foo\n_bar_\nbaz');
assert.deepStrictEqual(tokens, [
text('foo\n'),
tree('italic', [
text('bar')
], {}),
text('baz'),
]);
});
}); });
}); });