File tree 2 files changed +5
-5
lines changed
2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change 7
7
* @callback GetDefinition
8
8
* Get a definition by identifier.
9
9
* @param {string | null | undefined } [identifier]
10
- * Identifier of definition.
10
+ * Identifier of definition (optional) .
11
11
* @returns {Definition | null }
12
12
* Definition corresponding to `identifier` or `null`.
13
13
*/
Original file line number Diff line number Diff line change @@ -6,16 +6,17 @@ import assert from 'node:assert/strict'
6
6
import test from 'node:test'
7
7
import { fromMarkdown } from 'mdast-util-from-markdown'
8
8
import { definitions } from './index.js'
9
- import * as mod from './index.js'
10
9
11
10
test ( 'definitions' , async function ( t ) {
12
11
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
+ ] )
14
15
} )
15
16
16
17
await t . test ( 'should fail without node' , async function ( ) {
17
18
assert . throws ( function ( ) {
18
- // @ts -expect-error runtime
19
+ // @ts -expect-error: check that an error is thrown at runtime.
19
20
definitions ( )
20
21
} , / m d a s t - u t i l - d e f i n i t i o n s e x p e c t e d n o d e / )
21
22
} )
@@ -104,7 +105,6 @@ test('definitions', async function (t) {
104
105
} )
105
106
106
107
/**
107
- *
108
108
* @param {string } value
109
109
* @returns {Root }
110
110
*/
You can’t perform that action at this time.
0 commit comments