Skip to content

Commit b70a803

Browse files
committed
Add tests for exposed identifiers
1 parent f27fdd2 commit b70a803

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

test.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,13 @@ import test from 'node:test'
33
import {u} from 'unist-builder'
44
import {h} from 'hastscript'
55
import {toText} from './index.js'
6+
import * as mod from './index.js'
67

78
test('toText', () => {
9+
const api = Object.keys(mod)
10+
assert.ok(api.includes('toText'), 'should expose `toText`')
11+
assert.equal(api.length, 1, 'should expose the public api')
12+
813
assert.equal(
914
toText(h('div', 'a\n b\t\nc')),
1015
'a b c',

0 commit comments

Comments
 (0)