Skip to content

Commit 2543409

Browse files
committed
Add tests for exposed identifiers
1 parent 8901d8b commit 2543409

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

test.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,18 @@ import {x} from 'xastscript'
99
import {retext} from 'retext'
1010
import {fromXml} from 'xast-util-from-xml'
1111
import {inspect, inspectColor, inspectNoColor} from './index.js'
12+
import * as mod from './index.js'
1213

1314
const chalkEnabled = new Chalk({level: 1})
1415

1516
const paragraph = 'Some simple text. Other “sentence”.'
1617

17-
test('inspect', () => {
18-
assert.equal(typeof inspect, 'function', 'should be a `function`')
18+
test('core', () => {
19+
assert.deepEqual(
20+
Object.keys(mod).sort(),
21+
['inspect', 'inspectColor', 'inspectNoColor'],
22+
'should expose the public api'
23+
)
1924
})
2025

2126
test('inspect()', () => {

0 commit comments

Comments
 (0)