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 24, 2023
1 parent 169f938 commit 83df9b3
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion test.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {fromMarkdown} from 'mdast-util-from-markdown'
import {gfmFromMarkdown} from 'mdast-util-gfm'
import {gfm} from 'micromark-extension-gfm'
import {visit, CONTINUE, EXIT, SKIP} from './index.js'
import * as mod from './index.js'

const tree = fromMarkdown('Some _emphasis_, **importance**, and `code`.')

Expand Down Expand Up @@ -47,7 +48,13 @@ const reverseTypes = [
'text'
]

test('visit', async (t) => {
test('visit', async function (t) {
assert.deepEqual(
Object.keys(mod).sort(),
['CONTINUE', 'EXIT', 'SKIP', 'visit'],
'should expose the public api'
)

assert.throws(
() => {
// @ts-expect-error runtime.
Expand Down

0 comments on commit 83df9b3

Please sign in to comment.