summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2018-11-25 13:21:39 +0900
committersyuilo <syuilotan@yahoo.co.jp>2018-11-25 13:21:39 +0900
commit995cf503eb0e2b0ea4df6a232984203c5b027ee4 (patch)
tree0e5d8768d2b63b12d48d15867578c7c1dc64a2f4 /test
parentRefactoring (diff)
downloadsharkey-995cf503eb0e2b0ea4df6a232984203c5b027ee4.tar.gz
sharkey-995cf503eb0e2b0ea4df6a232984203c5b027ee4.tar.bz2
sharkey-995cf503eb0e2b0ea4df6a232984203c5b027ee4.zip
Add MFM test
Diffstat (limited to 'test')
-rw-r--r--test/mfm.ts9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/mfm.ts b/test/mfm.ts
index 9956f679bf..ac52041bb3 100644
--- a/test/mfm.ts
+++ b/test/mfm.ts
@@ -449,6 +449,15 @@ describe('Text', () => {
], tokens);
});
+ it('simple (with silent flag)', () => {
+ const tokens = analyze('?[foo](https://example.com)');
+ assert.deepEqual([
+ nodeWithChildren('link', [
+ text('foo')
+ ], { url: 'https://example.com', silent: true })
+ ], tokens);
+ });
+
it('in text', () => {
const tokens = analyze('before[foo](https://example.com)after');
assert.deepEqual([