Skip to content

Commit 192f4f9

Browse files
committed
Add tests for exposed identifiers
1 parent e529f8e commit 192f4f9

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

test/index.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,17 @@ import {webNamespaces} from 'web-namespaces'
1111
import {h, s} from 'hastscript'
1212
import serialize from 'w3c-xmlserializer'
1313
import {toDom} from '../index.js'
14+
import * as mod from '../index.js'
1415

1516
const document = new JSDOM().window.document
1617

1718
globalThis.document = document
1819

19-
test('hast-util-to-dom', () => {
20+
test('toDom', () => {
21+
const api = Object.keys(mod)
22+
assert.ok(api.includes('toDom'), 'should expose `toDom`')
23+
assert.equal(api.length, 1, 'should expose the public api')
24+
2025
assert.equal(
2126
// @ts-expect-error runtime.
2227
serializeNodeToHtmlString(toDom({type: 'root'})),

0 commit comments

Comments
 (0)