Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save hrishikeshs/b566b1bb83e436836558ea92dcf85cb1 to your computer and use it in GitHub Desktop.

Select an option

Save hrishikeshs/b566b1bb83e436836558ea92dcf85cb1 to your computer and use it in GitHub Desktop.
Command to direct npm run test's output to a file while stripping terminal escape sequences so test results can be analyzed later
npm run test 2>&1| sed -r "s/\x1B\[[0-9;]*[mK]//g" | tee test-results.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment