From 7b3f558c1182632644bbdba699880d6b7802a64c Mon Sep 17 00:00:00 2001 From: Titus Wormer Date: Fri, 18 Oct 2024 15:52:55 +0200 Subject: [PATCH] Fix tests for Node 23 --- packages/loader/test/index.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/packages/loader/test/index.js b/packages/loader/test/index.js index c964087d8..b6a4804a3 100644 --- a/packages/loader/test/index.js +++ b/packages/loader/test/index.js @@ -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 () {