/*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ import * as assert from 'assert'; import * as vscode from 'vscode'; import 'mocha'; import { InMemoryDocument } from './inMemoryDocument'; import { createNewMarkdownEngine } from './engine'; const testFileName = vscode.Uri.file('test.md'); suite('markdown.engine', () => { suite('rendering', () => { const input = '# hello\n\nworld!'; const output = '
world!
\n'; test('Renders a document', async () => { const doc = new InMemoryDocument(testFileName, input); const engine = createNewMarkdownEngine(); assert.strictEqual(await engine.render(doc), output); }); test('Renders a string', async () => { const engine = createNewMarkdownEngine(); assert.strictEqual(await engine.render(input), output); }); }); });