Skip to content

Commit 1f66a62

Browse files
committed
Add tests for exposed identifiers
1 parent 523f008 commit 1f66a62

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

test.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,13 @@ import test from 'node:test'
33
import {h} from 'hastscript'
44
import {selectAll} from 'hast-util-select'
55
import {truncate} from './index.js'
6+
import * as mod from './index.js'
7+
8+
test('truncate', () => {
9+
const api = Object.keys(mod)
10+
assert.ok(api.includes('truncate'), 'should expose `truncate`')
11+
assert.equal(api.length, 1, 'should expose the public api')
612

7-
test('hastUtilTruncate', () => {
813
assert.deepEqual(
914
truncate(h('p', 'Lorem ipsum dolor sit amet'), {size: 11}),
1015
h('p', 'Lorem ipsum'),

0 commit comments

Comments
 (0)