From 051e903d43d76948147d201e7b57e79757b21baf Mon Sep 17 00:00:00 2001 From: marihachi Date: Sun, 17 Oct 2021 14:33:22 +0900 Subject: [PATCH] add test --- test/api.ts | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/test/api.ts b/test/api.ts index e127e80..8974444 100644 --- a/test/api.ts +++ b/test/api.ts @@ -38,7 +38,17 @@ after`; it('search', () => { const input = 'MFM 書き方 123 Search'; - assert.strictEqual(mfm.toString(mfm.parse(input)), 'MFM 書き方 123 Search'); + assert.strictEqual(mfm.toString(mfm.parse(input)), input); + }); + + it('block code', () => { + const input = '```\nabc\n```'; + assert.strictEqual(mfm.toString(mfm.parse(input)), input); + }); + + it('math block', () => { + const input = '\\[\ny = 2x + 1\n\\]'; + assert.strictEqual(mfm.toString(mfm.parse(input)), input); }); it('center', () => {