Fix test script to work on macOS default bash
Replace globstar (bash 4.0+) with find for portability. macOS ships with bash 3.2 which doesn't support globstar. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -9,5 +9,6 @@
|
|||||||
"strict": true,
|
"strict": true,
|
||||||
"types": ["node"],
|
"types": ["node"],
|
||||||
"outDir": "out"
|
"outDir": "out"
|
||||||
}
|
},
|
||||||
|
"exclude": ["**/*.spec.ts", "**/*.test.ts"]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,14 +2,14 @@
|
|||||||
|
|
||||||
set -eu
|
set -eu
|
||||||
|
|
||||||
shopt -s globstar nullglob
|
|
||||||
|
|
||||||
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||||
|
|
||||||
cd "$DIR/../../express"
|
cd "$DIR/../../express"
|
||||||
|
|
||||||
if [ $# -eq 0 ]; then
|
if [ $# -eq 0 ]; then
|
||||||
"$DIR"/../shims/pnpm tsx --test ./**/*.spec.ts ./**/*.test.ts
|
# Find all test files - use -print0/xargs to handle filenames safely
|
||||||
|
find . -type f \( -name '*.spec.ts' -o -name '*.test.ts' \) -print0 | \
|
||||||
|
xargs -0 "$DIR"/../shims/pnpm tsx --test
|
||||||
else
|
else
|
||||||
"$DIR"/../shims/pnpm tsx --test "$@"
|
"$DIR"/../shims/pnpm tsx --test "$@"
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user