Use globstar for recursive matching and support both *.spec.ts and *.test.ts patterns in any subdirectory. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
16 lines
265 B
Bash
Executable File
16 lines
265 B
Bash
Executable File
#!/bin/bash
|
|
|
|
set -eu
|
|
|
|
shopt -s globstar nullglob
|
|
|
|
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
|
|
cd "$DIR/../../express"
|
|
|
|
if [ $# -eq 0 ]; then
|
|
"$DIR"/../shims/pnpm tsx --test ./**/*.spec.ts ./**/*.test.ts
|
|
else
|
|
"$DIR"/../shims/pnpm tsx --test "$@"
|
|
fi
|