| 1 | #!/usr/bin/env bash |
| 2 | |
| 3 | set -e |
| 4 | |
| 5 | # We had to extract this script to a file because pnpm crashes when it finds a `!` in an npm script |
| 6 | # We are using npm here because the pid returned by pnpm is wrong and would not shut down the server |
| 7 | TEST_PORT=3005 "$(pnpm bin)/tsx" test/server.ts & |
| 8 | SERVER_PID=$! && |
| 9 | sleep 2 && # Arbitrary time |
| 10 | npm run test:fixtures |
| 11 | kill $SERVER_PID |