diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2017-03-18 01:16:32 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2017-03-18 01:16:32 +0900 |
| commit | bc3006f3c41297536788ec20ea012ba0a4d0ee24 (patch) | |
| tree | 66878ca481de7e0005bfd6bb91c7d027d018511d /test | |
| parent | nanka iroiro (diff) | |
| download | misskey-bc3006f3c41297536788ec20ea012ba0a4d0ee24.tar.gz misskey-bc3006f3c41297536788ec20ea012ba0a4d0ee24.tar.bz2 misskey-bc3006f3c41297536788ec20ea012ba0a4d0ee24.zip | |
#277
Diffstat (limited to 'test')
| -rw-r--r-- | test/text.js | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/test/text.js b/test/text.js index e2527cfe0b..dd4521c835 100644 --- a/test/text.js +++ b/test/text.js @@ -49,11 +49,23 @@ describe('Text', () => { ], tokens); }); - it('link', () => { + it('url', () => { const tokens = analyze('https://himasaku.net'); - assert.deepEqual([ - { type: 'link', content: 'https://himasaku.net' } - ], tokens); + assert.deepEqual([{ + type: 'url', + content: 'https://himasaku.net', + url: 'https://himasaku.net' + }], tokens); + }); + + it('link', () => { + const tokens = analyze('[ひまさく](https://himasaku.net)'); + assert.deepEqual([{ + type: 'link', + content: '[ひまさく](https://himasaku.net)', + title: 'ひまさく', + url: 'https://himasaku.net' + }], tokens); }); it('emoji', () => { |