diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2019-06-16 21:26:43 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2019-06-16 21:26:43 +0900 |
| commit | b134467bd345598f4386992f0e6e4462114612ee (patch) | |
| tree | 6d0186594b57e6a3c730a43e6ede2aeb941ee745 /test | |
| parent | 11.21.0 (diff) | |
| download | sharkey-b134467bd345598f4386992f0e6e4462114612ee.tar.gz sharkey-b134467bd345598f4386992f0e6e4462114612ee.tar.bz2 sharkey-b134467bd345598f4386992f0e6e4462114612ee.zip | |
Add some MFM tests
Diffstat (limited to 'test')
| -rw-r--r-- | test/mfm.ts | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/mfm.ts b/test/mfm.ts index 89b414eba8..34dd324319 100644 --- a/test/mfm.ts +++ b/test/mfm.ts @@ -1173,6 +1173,24 @@ describe('MFM', () => { text('foo_bar_baz'), ]); }); + + it('require spaces', () => { + const tokens = parse('湊おじたん@4日目_L38b #pixiv https://www.pixiv.net/member_illust.php'); + assert.deepStrictEqual(tokens, [ + text('湊おじたん@4日目_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'), + ]); + }); }); }); |