Skip to content

Commit d7d5849

Browse files
committed
Add tests for exposed identifiers
1 parent 3c358e3 commit d7d5849

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

test.js

+6
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,14 @@
66
import assert from 'node:assert/strict'
77
import test from 'node:test'
88
import {isElement} from './index.js'
9+
import * as mod from './index.js'
910

1011
test('isElement', async (t) => {
12+
const api = Object.keys(mod)
13+
assert.ok(api.includes('isElement'), 'should expose `isElement`')
14+
assert.ok(api.includes('convertElement'), 'should expose `convertElement`')
15+
assert.equal(api.length, 2, 'should expose the public api')
16+
1117
assert.equal(isElement(), false, 'should return `false` without node')
1218
assert.equal(isElement(null), false, 'should return `false` with `null`')
1319

0 commit comments

Comments
 (0)