Skip to content

Commit a643531

Browse files
committed
Add tests for exposed identifiers
1 parent 68d158d commit a643531

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
@@ -1,8 +1,15 @@
11
import assert from 'node:assert/strict'
22
import test from 'node:test'
33
import {start, cont, name} from './index.js'
4+
import * as mod from './index.js'
5+
6+
test('isIdentifierName', () => {
7+
assert.deepEqual(
8+
Object.keys(mod).sort(),
9+
['cont', 'name', 'start'],
10+
'should expose the public api'
11+
)
412

5-
test('estree-util-is-identifier-name', () => {
613
assert.ok(start('a'.charCodeAt(0)), 'should say `a` is a start code')
714
assert.ok(start('_'.charCodeAt(0)), 'should say `_` is a start code')
815
assert.ok(!start('1'.charCodeAt(0)), 'should not say `1` is a start code')

0 commit comments

Comments
 (0)