Skip to content

Commit

Permalink
Fix tests for Node 23
Browse files Browse the repository at this point in the history
  • Loading branch information
wooorm committed Oct 18, 2024
1 parent 77158cd commit 7b3f558
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions packages/loader/test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,13 @@ const webpack = await promisify(webpackCallback)

test('@mdx-js/loader', async function (t) {
await t.test('should expose the public api', async function () {
assert.deepEqual(Object.keys(await import('@mdx-js/loader')).sort(), [
'default'
])
const keys = Object.keys(await import('@mdx-js/loader'))
.sort()
// To do: when Node 23 is the lowest baseline,
// drop this.
.filter((key) => key !== 'module.exports')

assert.deepEqual(keys, ['default'])
})

await t.test('should work', async function () {
Expand Down

0 comments on commit 7b3f558

Please sign in to comment.