From 2c24f8a9ef0beabd9585e75f51799f5a83e667e9 Mon Sep 17 00:00:00 2001 From: Francis Dinh Date: Mon, 12 Sep 2022 16:30:29 -0400 Subject: [PATCH] backend: make toHtml tests async PRs #84, #134, and #136 changed toHtml to be async, but the test was not updated to reflect that. --- packages/backend/test/mfm.ts | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/packages/backend/test/mfm.ts b/packages/backend/test/mfm.ts index 5218942a5..5b9e47414 100644 --- a/packages/backend/test/mfm.ts +++ b/packages/backend/test/mfm.ts @@ -1,20 +1,19 @@ import * as assert from 'assert'; -import * as mfm from 'mfm-js'; import { toHtml } from '../src/mfm/to-html.js'; import { fromHtml } from '../src/mfm/from-html.js'; describe('toHtml', () => { - it('br', () => { + it('br', async () => { const input = 'foo\nbar\nbaz'; const output = '

foo
bar
baz

'; - assert.equal(toHtml(mfm.parse(input)), output); + assert.equal(await toHtml(input), output); }); - it('br alt', () => { + it('br alt', async () => { const input = 'foo\r\nbar\rbaz'; const output = '

foo
bar
baz

'; - assert.equal(toHtml(mfm.parse(input)), output); + assert.equal(await toHtml(input), output); }); });