Skip to content

Commit 6d0d55b

Browse files
committed
Add tests for exposed identifiers
1 parent 058eea4 commit 6d0d55b

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

test.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,17 @@ import {h, s} from 'hastscript'
55
import {u} from 'unist-builder'
66
import deepmerge from 'deepmerge'
77
import {sanitize, defaultSchema} from './index.js'
8+
import * as mod from './index.js'
89

910
const own = {}.hasOwnProperty
1011

1112
test('sanitize()', async (t) => {
13+
assert.deepEqual(
14+
Object.keys(mod).sort(),
15+
['defaultSchema', 'sanitize'],
16+
'should expose the public api'
17+
)
18+
1219
await t.test('non-node', () => {
1320
// @ts-expect-error runtime.
1421
assert.equal(toHtml(sanitize(true)), '', 'should ignore non-nodes (#1)')

0 commit comments

Comments
 (0)