From faacf34ba0db3f40f1a26eeb6fbd70f9e8c673e3 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sat, 26 Jun 2021 23:16:09 +0900 Subject: [PATCH] Add link test --- test/parser.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/test/parser.ts b/test/parser.ts index e419d84..216cf1f 100644 --- a/test/parser.ts +++ b/test/parser.ts @@ -931,6 +931,16 @@ hoge`; assert.deepStrictEqual(mfm.parse(input), output); }); + it('do not yield mention', () => { + const input = '[@example](https://example.com)'; + const output = [ + LINK(false, 'https://example.com', [ + TEXT('@example') + ]), + ]; + assert.deepStrictEqual(mfm.parse(input), output); + }); + it('with brackets', () => { const input = '[foo](https://example.com/foo(bar))'; const output = [