marked-mfm/test/index.test.js
Sol Fisher Romanoff 76904e0888
Turn export into an object
we have no options
2022-07-08 11:39:48 +03:00

14 lines
566 B
JavaScript

import { marked } from 'marked'
import markedMfm from '../src/index.js'
describe('marked-mfm', () => {
test('inline', () => {
marked.use(markedMfm)
expect(marked('$[x2 this text is bigger]')).toBe('<p><span style="display: inline-block" class="x2">this text is bigger</span></p>\n')
})
test('nested', () => {
marked.use(markedMfm)
expect(marked('$[twitch twitch $[sparkle sparkle]]')).toBe('<p><span style="display: inline-block" class="twitch">twitch <span style="display: inline-block" class="sparkle">sparkle</span></span></p>\n')
})
})