summaryrefslogtreecommitdiffstats
path: root/test/esm-wrapper.js
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--test/esm-wrapper.js19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/esm-wrapper.js b/test/esm-wrapper.js
new file mode 100644
index 0000000..a593fbd
--- /dev/null
+++ b/test/esm-wrapper.js
@@ -0,0 +1,19 @@
+'use strict'
+const { nodeMajor, nodeMinor } = require('../lib/core/util')
+
+if (!((nodeMajor > 14 || (nodeMajor === 14 && nodeMajor > 13)) || (nodeMajor === 12 && nodeMinor > 20))) {
+ require('tap') // shows skipped
+} else {
+ ;(async () => {
+ try {
+ await import('./utils/esm-wrapper.mjs')
+ } catch (e) {
+ if (e.message === 'Not supported') {
+ require('tap') // shows skipped
+ return
+ }
+ console.error(e.stack)
+ process.exitCode = 1
+ }
+ })()
+}