@@ -6,65 +6,65 @@ import assert from 'node:assert/strict'
6
6
import { test } from 'node:test'
7
7
import { resolveRemarkPlugins } from '@mdx-js/language-service'
8
8
9
- test ( 'ignore null' , async ( ) => {
10
- const result = await resolveRemarkPlugins ( null , ( ) => ( ) => { } )
9
+ test ( 'ignore null' , ( ) => {
10
+ const result = resolveRemarkPlugins ( null , ( ) => ( ) => { } )
11
11
12
12
assert . equal ( result , undefined )
13
13
} )
14
14
15
- test ( 'ignore non-objects' , async ( ) => {
16
- const result = await resolveRemarkPlugins ( 'string' , ( ) => ( ) => { } )
15
+ test ( 'ignore non-objects' , ( ) => {
16
+ const result = resolveRemarkPlugins ( 'string' , ( ) => ( ) => { } )
17
17
18
18
assert . equal ( result , undefined )
19
19
} )
20
20
21
- test ( 'ignore objects without `plugins` key' , async ( ) => {
22
- const result = await resolveRemarkPlugins ( { } , ( ) => ( ) => { } )
21
+ test ( 'ignore objects without `plugins` key' , ( ) => {
22
+ const result = resolveRemarkPlugins ( { } , ( ) => ( ) => { } )
23
23
24
24
assert . equal ( result , undefined )
25
25
} )
26
26
27
- test ( 'ignore null plugins' , async ( ) => {
28
- const result = await resolveRemarkPlugins ( { plugins : null } , ( ) => ( ) => { } )
27
+ test ( 'ignore null plugins' , ( ) => {
28
+ const result = resolveRemarkPlugins ( { plugins : null } , ( ) => ( ) => { } )
29
29
30
30
assert . equal ( result , undefined )
31
31
} )
32
32
33
- test ( 'ignore non-object plugins' , async ( ) => {
34
- const result = await resolveRemarkPlugins ( { plugins : 'string' } , ( ) => ( ) => { } )
33
+ test ( 'ignore non-object plugins' , ( ) => {
34
+ const result = resolveRemarkPlugins ( { plugins : 'string' } , ( ) => ( ) => { } )
35
35
36
36
assert . equal ( result , undefined )
37
37
} )
38
38
39
- test ( 'ignore empty plugins' , async ( ) => {
40
- const result = await resolveRemarkPlugins ( { plugins : [ ] } , ( ) => ( ) => { } )
39
+ test ( 'ignore empty plugins' , ( ) => {
40
+ const result = resolveRemarkPlugins ( { plugins : [ ] } , ( ) => ( ) => { } )
41
41
42
42
assert . equal ( result , undefined )
43
43
} )
44
44
45
- test ( 'load array of plugin tuples' , async ( ) => {
45
+ test ( 'load array of plugin tuples' , ( ) => {
46
46
/** @type {Record<string, Plugin> } */
47
47
const plugins = {
48
48
a ( ) { } ,
49
49
b ( ) { }
50
50
}
51
51
52
- const result = await resolveRemarkPlugins (
52
+ const result = resolveRemarkPlugins (
53
53
{ plugins : [ 'a' , [ 'b' , 'b options' ] , 42 ] } ,
54
54
( name ) => plugins [ name ]
55
55
)
56
56
57
57
assert . deepEqual ( result , [ [ plugins . a ] , [ plugins . b , 'b options' ] ] )
58
58
} )
59
59
60
- test ( 'load object plugin mappings' , async ( ) => {
60
+ test ( 'load object plugin mappings' , ( ) => {
61
61
/** @type {Record<string, Plugin> } */
62
62
const plugins = {
63
63
a ( ) { } ,
64
64
b ( ) { }
65
65
}
66
66
67
- const result = await resolveRemarkPlugins (
67
+ const result = resolveRemarkPlugins (
68
68
{ plugins : { a : undefined , b : 'b options' } } ,
69
69
( name ) => plugins [ name ]
70
70
)
0 commit comments