Skip to content

Commit fa0a6cf

Browse files
committed
Make the resolveRemarkPlugins tests synchronous
1 parent 48d74c8 commit fa0a6cf

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

packages/language-service/test/tsconfig.js

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,65 +6,65 @@ import assert from 'node:assert/strict'
66
import {test} from 'node:test'
77
import {resolveRemarkPlugins} from '@mdx-js/language-service'
88

9-
test('ignore null', async () => {
10-
const result = await resolveRemarkPlugins(null, () => () => {})
9+
test('ignore null', () => {
10+
const result = resolveRemarkPlugins(null, () => () => {})
1111

1212
assert.equal(result, undefined)
1313
})
1414

15-
test('ignore non-objects', async () => {
16-
const result = await resolveRemarkPlugins('string', () => () => {})
15+
test('ignore non-objects', () => {
16+
const result = resolveRemarkPlugins('string', () => () => {})
1717

1818
assert.equal(result, undefined)
1919
})
2020

21-
test('ignore objects without `plugins` key', async () => {
22-
const result = await resolveRemarkPlugins({}, () => () => {})
21+
test('ignore objects without `plugins` key', () => {
22+
const result = resolveRemarkPlugins({}, () => () => {})
2323

2424
assert.equal(result, undefined)
2525
})
2626

27-
test('ignore null plugins', async () => {
28-
const result = await resolveRemarkPlugins({plugins: null}, () => () => {})
27+
test('ignore null plugins', () => {
28+
const result = resolveRemarkPlugins({plugins: null}, () => () => {})
2929

3030
assert.equal(result, undefined)
3131
})
3232

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'}, () => () => {})
3535

3636
assert.equal(result, undefined)
3737
})
3838

39-
test('ignore empty plugins', async () => {
40-
const result = await resolveRemarkPlugins({plugins: []}, () => () => {})
39+
test('ignore empty plugins', () => {
40+
const result = resolveRemarkPlugins({plugins: []}, () => () => {})
4141

4242
assert.equal(result, undefined)
4343
})
4444

45-
test('load array of plugin tuples', async () => {
45+
test('load array of plugin tuples', () => {
4646
/** @type {Record<string, Plugin>} */
4747
const plugins = {
4848
a() {},
4949
b() {}
5050
}
5151

52-
const result = await resolveRemarkPlugins(
52+
const result = resolveRemarkPlugins(
5353
{plugins: ['a', ['b', 'b options'], 42]},
5454
(name) => plugins[name]
5555
)
5656

5757
assert.deepEqual(result, [[plugins.a], [plugins.b, 'b options']])
5858
})
5959

60-
test('load object plugin mappings', async () => {
60+
test('load object plugin mappings', () => {
6161
/** @type {Record<string, Plugin>} */
6262
const plugins = {
6363
a() {},
6464
b() {}
6565
}
6666

67-
const result = await resolveRemarkPlugins(
67+
const result = resolveRemarkPlugins(
6868
{plugins: {a: undefined, b: 'b options'}},
6969
(name) => plugins[name]
7070
)

0 commit comments

Comments
 (0)