Skip to content

Commit ab14525

Browse files
committed
Add tests for exposed identifiers
1 parent 9950dad commit ab14525

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

test/index.js

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,22 @@ import test from 'node:test'
88
import {fromMarkdown} from 'mdast-util-from-markdown'
99
import {removePosition} from 'unist-util-remove-position'
1010
import {normalizeHeadings} from '../index.js'
11+
import * as mod from '../index.js'
12+
13+
test('normalizeHeadings', async () => {
14+
assert.deepEqual(
15+
Object.keys(mod).sort(),
16+
['normalizeHeadings'],
17+
'should expose the public api'
18+
)
1119

12-
test('Multiple top-level headings', async () => {
1320
await check('no-headings', 'No-op if there is no headings')
1421
await check('no-titles', 'No-op if there is no top-level headings')
1522
await check('one-title', 'No-op if there is a single top-level heading')
1623
await check('two-titles', 'Makes the second header one level deeper')
1724
await check('more-titles', 'Shifts all other headings one level deeper')
18-
})
19-
20-
test('Level 7', async () => {
2125
await check('hierarchy', 'There is no depth level 7')
2226
})
23-
2427
/**
2528
* @param {string} test
2629
* @param {string} message

0 commit comments

Comments
 (0)