Skip to content

Commit

Permalink
Add tests for exposed identifiers
Browse files Browse the repository at this point in the history
  • Loading branch information
wooorm committed Jan 17, 2023
1 parent 5ab03c4 commit 469ebc2
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions test/test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import raw from 'rehype-raw'
import toc from 'remark-toc'
import ReactDom from 'react-dom/server'
import Markdown from '../index.js'
import * as mod from '../index.js'

const own = {}.hasOwnProperty

Expand All @@ -25,6 +26,14 @@ function asHtml(input) {
return ReactDom.renderToStaticMarkup(input)
}

test('ReactMarkdown', () => {
assert.deepEqual(
Object.keys(mod).sort(),
['default', 'uriTransformer'],
'should expose the public api'
)
})

test('can render the most basic of documents (single paragraph)', () => {
assert.equal(asHtml(<Markdown>Test</Markdown>), '<p>Test</p>')
})
Expand Down

0 comments on commit 469ebc2

Please sign in to comment.