From 59764d8d9a2378418f9484bca85411c8ae761dcc Mon Sep 17 00:00:00 2001 From: NullVoxPopuli <199018+NullVoxPopuli@users.noreply.github.com> Date: Sat, 14 Oct 2023 09:00:45 -0400 Subject: [PATCH 1/3] Create node test --- test/es2018/explicit-imports.mjs | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 test/es2018/explicit-imports.mjs diff --git a/test/es2018/explicit-imports.mjs b/test/es2018/explicit-imports.mjs new file mode 100644 index 000000000..0e77de554 --- /dev/null +++ b/test/es2018/explicit-imports.mjs @@ -0,0 +1,7 @@ +import { module, test } from 'qunit'; + +module('ESM test suite', () => { + test('imports worked', function (assert) { + assert.true(true, 'an assertion'); + }); +}); From 5d6223d703906a3e753d87480cdd9300d686d73d Mon Sep 17 00:00:00 2001 From: NullVoxPopuli <199018+NullVoxPopuli@users.noreply.github.com> Date: Sat, 14 Oct 2023 09:06:16 -0400 Subject: [PATCH 2/3] update exports --- src/export.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/export.js b/src/export.js index e0bd6da3b..ef0a2185d 100644 --- a/src/export.js +++ b/src/export.js @@ -21,6 +21,11 @@ export default function exportQUnit (QUnit) { // For consistency with CommonJS environments' exports module.exports.QUnit = QUnit; + // For allowing a CJS-compatible ESM imports + module.exports.todo = QUnit.todo; + module.exports.skip = QUnit.skip; + module.exports.test = QUnit.test; + module.exports.module = QUnit.module; exportedModule = true; } From 6886f36a46984ece460652fc423bf42f28f89f85 Mon Sep 17 00:00:00 2001 From: NullVoxPopuli <199018+NullVoxPopuli@users.noreply.github.com> Date: Sat, 14 Oct 2023 09:06:58 -0400 Subject: [PATCH 3/3] Change comment --- src/export.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/export.js b/src/export.js index ef0a2185d..c1a0e228a 100644 --- a/src/export.js +++ b/src/export.js @@ -21,7 +21,7 @@ export default function exportQUnit (QUnit) { // For consistency with CommonJS environments' exports module.exports.QUnit = QUnit; - // For allowing a CJS-compatible ESM imports + // For allowing ESM imports module.exports.todo = QUnit.todo; module.exports.skip = QUnit.skip; module.exports.test = QUnit.test;