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 23, 2023
1 parent edac8fe commit 0b175b3
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions test.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import test from 'node:test'
// To do: replace with `structuredClone` when stable.
import clone from 'clone'
import {parents} from './index.js'
import * as mod from './index.js'

/** @type {Root} */
const ast = {
Expand All @@ -25,6 +26,14 @@ const ast = {
]
}

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

test('immutable', function () {
const original = clone(ast)
const root = parents(ast)
Expand Down

0 comments on commit 0b175b3

Please sign in to comment.