Skip to content

Commit 2ef9a5b

Browse files
committed
Add tests for exposed identifiers
1 parent 184af25 commit 2ef9a5b

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

test.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,15 @@ import assert from 'node:assert/strict'
22
import test from 'node:test'
33
import {u} from 'unist-builder'
44
import {compact} from './index.js'
5+
import * as mod from './index.js'
6+
7+
test('compact', () => {
8+
assert.deepEqual(
9+
Object.keys(mod).sort(),
10+
['compact'],
11+
'should expose the public api'
12+
)
513

6-
test('compact()', () => {
714
assert.deepEqual(
815
compact(
916
u('paragraph', [u('text', 'alpha'), u('text', ' '), u('text', 'bravo')])

0 commit comments

Comments
 (0)