Skip to content

Instantly share code, notes, and snippets.

@hgwr
Last active August 23, 2019 05:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hgwr/5ce2b9509c4ffa7693627e32541e9646 to your computer and use it in GitHub Desktop.
Save hgwr/5ce2b9509c4ffa7693627e32541e9646 to your computer and use it in GitHub Desktop.
run ng test and less log file
#!/bin/bash
logifle=~/tmp/ng_test_`date +'%Y%m%d-%H%M%S'`.log
if [ `node -v` == "v8.9.4" ]; then
ng test --single-run --code-coverage 2>&1 | tee "$logifle"
else
ng test --watch=false --code-coverage 2>&1 | tee "$logifle"
fi
open coverage/index.html
/usr/bin/less -R $logifle
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment