20 lines
538 B
Bash
20 lines
538 B
Bash
|
|
#!/bin/bash
|
||
|
|
# Run unit tests only (exclude e2e directories and Playwright tests)
|
||
|
|
|
||
|
|
cd "$(dirname "$0")/.."
|
||
|
|
|
||
|
|
# Collect test files excluding e2e directories and problematic files
|
||
|
|
TEST_FILES=$(find . \( -name "*.test.ts" -o -name "*.spec.ts" \) \
|
||
|
|
-not -path "*/node_modules/*" \
|
||
|
|
-not -path "*/e2e/*" \
|
||
|
|
-not -path "*create-api-client.test.ts" \
|
||
|
|
2>/dev/null)
|
||
|
|
|
||
|
|
if [ -z "$TEST_FILES" ]; then
|
||
|
|
echo "No test files found"
|
||
|
|
exit 0
|
||
|
|
fi
|
||
|
|
|
||
|
|
# Run bun test with collected files
|
||
|
|
echo "$TEST_FILES" | xargs ~/.bun/bin/bun test --timeout 10000 "$@"
|