#!/bin/bash # Run the tests and capture the output npm run test:unit > test-output.log 2>&1 # Check if 'No tests found' is in the log if grep -q 'No tests found' test-output.log; then echo "No tests found. Exiting with status 0." exit 0 else # Check if the test run was successful if [ $? -eq 0 ]; then echo "Tests executed successfully." exit 0 else echo "Tests failed. Exiting with status 1." exit 1 fi fi