fix(core): update

This commit is contained in:
2022-05-19 09:36:59 +02:00
parent dd1f8c928f
commit c42f3ee1b7
10 changed files with 4270 additions and 20164 deletions

View File

@@ -1,17 +1,17 @@
import { expect, tap } from '@pushrocks/tapbundle';
import * as smartmarkdown from '../ts/index';
import * as smartmarkdown from '../ts/index.js';
let smartMarkdownInstance: smartmarkdown.SmartMarkdown;
tap.test('should create a valid instance of SmartMarkdown', async () => {
smartMarkdownInstance = new smartmarkdown.SmartMarkdown();
expect(smartMarkdownInstance).to.be.instanceOf(smartmarkdown.SmartMarkdown);
expect(smartMarkdownInstance).toBeInstanceOf(smartmarkdown.SmartMarkdown);
});
tap.test('should convert a markdown string to html', async () => {
const markdownString = '# Hi!';
const htmlString = await smartMarkdownInstance.markdownToHtml(markdownString);
expect(htmlString).to.equal('<h1>Hi!</h1>\n');
expect(htmlString).toEqual('<h1>Hi!</h1>\n');
});
tap.test('should convert a html string to markdown', async () => {