From 103fe8b91de036613425ec5d39e5c21c38a6a0ee Mon Sep 17 00:00:00 2001 From: syuilo Date: Sun, 27 Jan 2019 19:32:35 +0900 Subject: [MFM] Resolve #4009 --- test/mfm.ts | 29 ++++++++++++++++++++++------- 1 file changed, 22 insertions(+), 7 deletions(-) (limited to 'test') diff --git a/test/mfm.ts b/test/mfm.ts index 0d07add0ee..a1f83fe1db 100644 --- a/test/mfm.ts +++ b/test/mfm.ts @@ -253,13 +253,28 @@ describe('MFM', () => { ]); }); - it('spin', () => { - const tokens = analyze(':foo:'); - assert.deepStrictEqual(tokens, [ - tree('spin', [ - leaf('emoji', { name: 'foo' }) - ], {}), - ]); + describe('spin', () => { + it('simple', () => { + const tokens = analyze(':foo:'); + assert.deepStrictEqual(tokens, [ + tree('spin', [ + leaf('emoji', { name: 'foo' }) + ], { + attr: null + }), + ]); + }); + + it('with attr', () => { + const tokens = analyze(':foo:'); + assert.deepStrictEqual(tokens, [ + tree('spin', [ + leaf('emoji', { name: 'foo' }) + ], { + attr: 'left' + }), + ]); + }); }); it('jump', () => { -- cgit v1.2.3-freya