Skip to content

Commit 770665b

Browse files
committed
Refactor code-style
1 parent ebc204d commit 770665b

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

lib/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @callback GetDefinition
88
* Get a definition by identifier.
99
* @param {string | null | undefined} [identifier]
10-
* Identifier of definition.
10+
* Identifier of definition (optional).
1111
* @returns {Definition | null}
1212
* Definition corresponding to `identifier` or `null`.
1313
*/

test.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,17 @@ import assert from 'node:assert/strict'
66
import test from 'node:test'
77
import {fromMarkdown} from 'mdast-util-from-markdown'
88
import {definitions} from './index.js'
9-
import * as mod from './index.js'
109

1110
test('definitions', async function (t) {
1211
await t.test('should expose the public api', async function () {
13-
assert.deepEqual(Object.keys(mod).sort(), ['definitions'])
12+
assert.deepEqual(Object.keys(await import('./index.js')).sort(), [
13+
'definitions'
14+
])
1415
})
1516

1617
await t.test('should fail without node', async function () {
1718
assert.throws(function () {
18-
// @ts-expect-error runtime
19+
// @ts-expect-error: check that an error is thrown at runtime.
1920
definitions()
2021
}, /mdast-util-definitions expected node/)
2122
})
@@ -104,7 +105,6 @@ test('definitions', async function (t) {
104105
})
105106

106107
/**
107-
*
108108
* @param {string} value
109109
* @returns {Root}
110110
*/

0 commit comments

Comments
 (0)