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>
16 lines
369 B
Bash
Executable File
16 lines
369 B
Bash
Executable File
#!/bin/bash
|
|
|
|
set -eu
|
|
|
|
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
|
|
cd "$DIR/../../express"
|
|
|
|
if [ $# -eq 0 ]; then
|
|
# 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
|
|
"$DIR"/../shims/pnpm tsx --test "$@"
|
|
fi
|