vibetunnel/web/scripts/profile-playwright-tests.sh
Peter Steinberger 74a364d1ba
Fix modal backdrop pointer-events issues (#195)
Co-authored-by: Claude <noreply@anthropic.com>
2025-07-03 01:03:15 +01:00

18 lines
No EOL
557 B
Bash
Executable file

#!/bin/bash
# Script to profile Playwright test performance
echo "Running Playwright tests with timing information..."
# Set environment variables for better performance
export PWTEST_SKIP_TEST_OUTPUT=1
export NODE_ENV=test
# Run tests with custom reporter that shows timing
pnpm exec playwright test --reporter=json | jq -r '
.suites[].suites[]?.specs[]? |
select(.tests[0].results[0].duration != null) |
"\(.tests[0].results[0].duration)ms - \(.file):\(.line) - \(.title)"
' | sort -rn | head -20
echo -e "\nTop 20 slowest tests listed above."