#!/bin/bash # Local testing script - run before committing/merging # Usage: ./scripts/test-local.sh echo "๐Ÿงช Running local tests before commit..." echo "" echo "๐Ÿ” Linting..." npm run lint || exit 1 echo "" echo "๐Ÿ’… Prettier check..." npm exec prettier -- --check "**/*.{js,jsx,ts,tsx,json,css,md}" || exit 1 echo "" echo "๐Ÿ“ฆ Component tests with coverage..." npm test || exit 1 echo "" echo "๐ŸŽญ E2E tests..." npm run test:e2e || exit 1 echo "" echo "๐Ÿ–ผ๏ธ Visual regression tests..." npm run visual:test || exit 1 echo "" echo "โšก Performance tests (Lighthouse CI)..." npm run performance:budget || exit 1 echo "" echo "โœ… All tests passed! Safe to commit/merge."