[MFM] Resolve #4009
This commit is contained in:
parent
311e67047d
commit
103fe8b91d
4 changed files with 45 additions and 10 deletions
29
test/mfm.ts
29
test/mfm.ts
|
@ -253,13 +253,28 @@ describe('MFM', () => {
|
|||
]);
|
||||
});
|
||||
|
||||
it('spin', () => {
|
||||
const tokens = analyze('<spin>:foo:</spin>');
|
||||
assert.deepStrictEqual(tokens, [
|
||||
tree('spin', [
|
||||
leaf('emoji', { name: 'foo' })
|
||||
], {}),
|
||||
]);
|
||||
describe('spin', () => {
|
||||
it('simple', () => {
|
||||
const tokens = analyze('<spin>:foo:</spin>');
|
||||
assert.deepStrictEqual(tokens, [
|
||||
tree('spin', [
|
||||
leaf('emoji', { name: 'foo' })
|
||||
], {
|
||||
attr: null
|
||||
}),
|
||||
]);
|
||||
});
|
||||
|
||||
it('with attr', () => {
|
||||
const tokens = analyze('<spin left>:foo:</spin>');
|
||||
assert.deepStrictEqual(tokens, [
|
||||
tree('spin', [
|
||||
leaf('emoji', { name: 'foo' })
|
||||
], {
|
||||
attr: 'left'
|
||||
}),
|
||||
]);
|
||||
});
|
||||
});
|
||||
|
||||
it('jump', () => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue