Skip to content

Commit

Permalink
Add tests for exposed identifiers
Browse files Browse the repository at this point in the history
  • Loading branch information
wooorm committed Jan 25, 2023
1 parent ab7eb0b commit 748289f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
import assert from 'node:assert/strict'
import test from 'node:test'
import {toString} from './index.js'
import * as mod from './index.js'

test('toString', () => {
assert.deepEqual(
Object.keys(mod).sort(),
['toString'],
'should expose the public api'
)

// @ts-expect-error: runtime.
assert.equal(toString(), '', 'should not fail on a missing node')
assert.equal(toString(null), '', 'should not fail on `null` missing node')
Expand Down

0 comments on commit 748289f

Please sign in to comment.