Add link test

This commit is contained in:
syuilo 2021-06-26 23:16:09 +09:00
parent 2eed3ecae5
commit faacf34ba0

View file

@ -931,6 +931,16 @@ hoge`;
assert.deepStrictEqual(mfm.parse(input), output); 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', () => { it('with brackets', () => {
const input = '[foo](https://example.com/foo(bar))'; const input = '[foo](https://example.com/foo(bar))';
const output = [ const output = [