Skip to content

Instantly share code, notes, and snippets.

@danielrose7
Last active October 24, 2025 16:27
Show Gist options
  • Save danielrose7/fe1f578b5aa1c50be8aea4cc1c3717b9 to your computer and use it in GitHub Desktop.
Save danielrose7/fe1f578b5aa1c50be8aea4cc1c3717b9 to your computer and use it in GitHub Desktop.
alias to run jest test files in current git status
# add to runs tests for both modified and untracked files ending in .test.ts extension
alias jestdiff="git status --porcelain | grep -E '\.test\.ts$' | awk '{print \$2}' | xargs pnpm jest"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment