Skip to content

Commit 469ebc2

Browse files
committed
Add tests for exposed identifiers
1 parent 5ab03c4 commit 469ebc2

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

test/test.jsx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import raw from 'rehype-raw'
1414
import toc from 'remark-toc'
1515
import ReactDom from 'react-dom/server'
1616
import Markdown from '../index.js'
17+
import * as mod from '../index.js'
1718

1819
const own = {}.hasOwnProperty
1920

@@ -25,6 +26,14 @@ function asHtml(input) {
2526
return ReactDom.renderToStaticMarkup(input)
2627
}
2728

29+
test('ReactMarkdown', () => {
30+
assert.deepEqual(
31+
Object.keys(mod).sort(),
32+
['default', 'uriTransformer'],
33+
'should expose the public api'
34+
)
35+
})
36+
2837
test('can render the most basic of documents (single paragraph)', () => {
2938
assert.equal(asHtml(<Markdown>Test</Markdown>), '<p>Test</p>')
3039
})

0 commit comments

Comments
 (0)