feat(package): modernize package metadata, typings, and test setup for ESM builds
This commit is contained in:
+5
-5
@@ -1,4 +1,4 @@
|
||||
import { expect, tap } from '@push.rocks/tapbundle';
|
||||
import { expect, tap } from '@git.zone/tstest/tapbundle';
|
||||
import * as smartmarkdown from '../ts/index.js';
|
||||
|
||||
let smartMarkdownInstance: smartmarkdown.SmartMarkdown;
|
||||
@@ -23,15 +23,15 @@ hello: yes
|
||||
# hello there
|
||||
`;
|
||||
const mdParsedResult = await smartMarkdownInstance.getMdParsedResultFromMarkdown(markdownString);
|
||||
|
||||
|
||||
expect(mdParsedResult.frontmatterData.hello).toEqual('yes');
|
||||
|
||||
});
|
||||
|
||||
tap.test('should convert a html string to markdown', async () => {
|
||||
const htmlString = '<h1 id="hi">Hi!</h1>\n<h2>This is it!</h2>';
|
||||
const markdownString = smartMarkdownInstance.htmlToMarkdown(htmlString);
|
||||
console.log(markdownString);
|
||||
expect(markdownString).toContain('# Hi!');
|
||||
expect(markdownString).toContain('## This is it!');
|
||||
});
|
||||
|
||||
tap.start();
|
||||
export default tap.start();
|
||||
|
||||
Reference in New Issue
Block a user