Skip to content

Commit 9318aa6

Browse files
committed
fixup: tests work on older node
1 parent 30b31b4 commit 9318aa6

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121
"./package": "./package.json"
2222
},
2323
"scripts": {
24-
"test": "tap --no-esm",
25-
"snap": "tap --no-esm",
24+
"test": "tap",
25+
"snap": "tap",
2626
"preversion": "npm test",
2727
"postversion": "npm publish",
2828
"postpublish": "git push origin --follow-tags"
@@ -47,7 +47,8 @@
4747
],
4848
"tap": {
4949
"check-coverage": true,
50-
"coverage-map": "map.js"
50+
"coverage-map": "map.js",
51+
"test-ignore": "test/esm-wrapper.mjs"
5152
},
5253
"engines": {
5354
"node": ">=10"

test/index.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,7 @@ t.match(Object.getOwnPropertyDescriptor(semver, 'SEMVER_SPEC_VERSION'), {
99
configurable: true,
1010
enumerable: true
1111
}, 'just a normal value property')
12+
13+
if (semver.gte(process.version, '14.0.0')) {
14+
t.spawn(process.execPath, require.resolve('./esm-wrapper.mjs'))
15+
}

0 commit comments

Comments
 (0)