1
0
Fork 1
mirror of https://example.com synced 2024-11-24 16:46:38 +09:00

Add some tests

This commit is contained in:
syuilo 2018-11-22 05:04:45 +09:00
parent 8cbb961493
commit 2b4d63b1bb
No known key found for this signature in database
GPG key ID: BDC4C49D06AB9D69

View file

@ -420,6 +420,26 @@ describe('Text', () => {
text('after'),
], tokens);
});
it('with brackets', () => {
const tokens = analyze('[foo](https://example.com/foo(bar))');
assert.deepEqual([
nodeWithChildren('link', [
text('foo')
], { url: 'https://example.com/foo(bar)', silent: false })
], tokens);
});
it('with parent brackets', () => {
const tokens = analyze('([foo](https://example.com/foo(bar)))');
assert.deepEqual([
text('('),
nodeWithChildren('link', [
text('foo')
], { url: 'https://example.com/foo(bar)', silent: false }),
text(')')
], tokens);
});
});
it('emoji', () => {