diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2019-01-31 14:31:25 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2019-01-31 14:31:25 +0900 |
| commit | e4c745bccd0fc431b81822291aeb9f06841f6b71 (patch) | |
| tree | bd0260fd017c72557fde739eab771543cf790d0b /test | |
| parent | 10.80.0 (diff) | |
| download | sharkey-e4c745bccd0fc431b81822291aeb9f06841f6b71.tar.gz sharkey-e4c745bccd0fc431b81822291aeb9f06841f6b71.tar.bz2 sharkey-e4c745bccd0fc431b81822291aeb9f06841f6b71.zip | |
[Test] Add MFM test
Diffstat (limited to 'test')
| -rw-r--r-- | test/mfm.ts | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/mfm.ts b/test/mfm.ts index 0de2e6b2c1..9f95d93b53 100644 --- a/test/mfm.ts +++ b/test/mfm.ts @@ -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, [ |