A TypeScript module with tests and no sources of its own is tested, not skipped
mesh/merge-gate pass: the change touches no module of the mesh's graph
mesh/repo-check pass: THE CHANGE ALTERS ITS OWN CHECK (merge-check.sh): main's version judged it; the change's judges the pull requests after it merges; it…
mesh/delivery superseded: a newer head of the same pull request
mesh/merge-gate pass: the change touches no module of the mesh's graph
mesh/repo-check pass: THE CHANGE ALTERS ITS OWN CHECK (merge-check.sh): main's version judged it; the change's judges the pull requests after it merges; it…
mesh/delivery superseded: a newer head of the same pull request
powerlevel10k carries only data and a test that reads it; the part skipped it silently.
This commit is contained in:
+16
-13
@@ -63,24 +63,27 @@ for m in $touched; do
|
|||||||
cp -r "$p" "$copy/node_modules/"
|
cp -r "$p" "$copy/node_modules/"
|
||||||
done
|
done
|
||||||
sources=$(cd "$copy" && find . -name '*.ts' ! -name '*.d.ts' ! -path './test/*' ! -path './node_modules/*' ! -path './dist/*' | sort)
|
sources=$(cd "$copy" && find . -name '*.ts' ! -name '*.d.ts' ! -path './test/*' ! -path './node_modules/*' ! -path './dist/*' | sort)
|
||||||
if [ -z "$sources" ]; then
|
if [ -n "$sources" ]; then
|
||||||
continue
|
echo "type-checking $d (TypeScript)"
|
||||||
fi
|
# shellcheck disable=SC2086 # the module's sources, none with a space in its name
|
||||||
echo "type-checking $d (TypeScript)"
|
if ! (cd "$copy" && node "$tsc" --noEmit --module NodeNext --moduleResolution NodeNext --target ES2022 \
|
||||||
# shellcheck disable=SC2086 # the module's sources, none with a space in its name
|
--types node $sources); then
|
||||||
if ! (cd "$copy" && node "$tsc" --noEmit --module NodeNext --moduleResolution NodeNext --target ES2022 \
|
failed="$failed $m"
|
||||||
--types node $sources); then
|
continue
|
||||||
failed="$failed $m"
|
fi
|
||||||
continue
|
else
|
||||||
|
echo "$d has no TypeScript sources of its own to type-check: its tests read its files"
|
||||||
fi
|
fi
|
||||||
if ! ls "$copy"/test/*.test.ts >/dev/null 2>&1; then
|
if ! ls "$copy"/test/*.test.ts >/dev/null 2>&1; then
|
||||||
echo "NOT TESTED: $d is TypeScript and has no tests of its own"
|
echo "NOT TESTED: $d is TypeScript and has no tests of its own"
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
# shellcheck disable=SC2086
|
if [ -n "$sources" ]; then
|
||||||
(cd "$copy" && node "$tsc" --module NodeNext --moduleResolution NodeNext --target ES2022 --types node \
|
# shellcheck disable=SC2086
|
||||||
--rootDir . --outDir dist $sources && node "$tsc" --module NodeNext --moduleResolution NodeNext \
|
(cd "$copy" && node "$tsc" --module NodeNext --moduleResolution NodeNext --target ES2022 --types node \
|
||||||
--target ES2022 --types node --rootDir . --outDir . $sources)
|
--rootDir . --outDir dist $sources && node "$tsc" --module NodeNext --moduleResolution NodeNext \
|
||||||
|
--target ES2022 --types node --rootDir . --outDir . $sources)
|
||||||
|
fi
|
||||||
echo "testing $d (TypeScript)"
|
echo "testing $d (TypeScript)"
|
||||||
if ! (cd "$copy" && node --test --test-reporter=spec --experimental-strip-types \
|
if ! (cd "$copy" && node --test --test-reporter=spec --experimental-strip-types \
|
||||||
--no-warnings=ExperimentalWarning test/*.test.ts); then
|
--no-warnings=ExperimentalWarning test/*.test.ts); then
|
||||||
|
|||||||
Reference in New Issue
Block a user