We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 98ce80d commit f49f0f8Copy full SHA for f49f0f8
bin/doctest
@@ -16,6 +16,11 @@ opening="$(get opening-delimiter)"
16
closing="$(get closing-delimiter)"
17
module="$(get module-type)"
18
19
+if [[ "$module" == esm ]] && [[ "$(node_major_version)" -lt 9 ]] ; then
20
+ echo 'Skipping ESM doctests on Node.js version less than v9.0.0' >&2
21
+ exit 0
22
+fi
23
+
24
node_modules/.bin/doctest \
25
--module "$module" \
26
--prefix "$prefix" \
functions
@@ -72,3 +72,7 @@ pass() {
72
fail() {
73
echo $'\x1B[0;31m\xE2\x9C\x98\x1B[0m' "$@"
74
}
75
76
+node_major_version() {
77
+ node --print process.versions.node | cut -d . -f 1
78
+}
0 commit comments