- #!/bin/bash
- declare -a vitest_args=("$@")
- if [[ -n "$MOCHA_GREP" ]]; then
- vitest_args+=("--testNamePattern" "$MOCHA_GREP")
- fi
- if [[ -n "$VITEST_NO_CACHE" ]]; then
- echo "Disabling cache for vitest."
- vitest_args+=("--no-cache")
- fi
- echo "Running unit tests in directory: $*"
- exec yarn run vitest run "${vitest_args[@]}"
|