mirror of
https://iceshrimp.dev/iceshrimp/iceshrimp
synced 2024-11-28 23:08:12 +09:00
Add some tests
This commit is contained in:
parent
4705cd1008
commit
dee36018fc
20
test/mfm.ts
20
test/mfm.ts
@ -420,6 +420,26 @@ describe('Text', () => {
|
|||||||
text('after'),
|
text('after'),
|
||||||
], tokens);
|
], 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', () => {
|
it('emoji', () => {
|
||||||
|
Loading…
Reference in New Issue
Block a user