Skip to content

Instantly share code, notes, and snippets.

@hgwr hgwr/ng_test.sh
Last active Aug 23, 2019

Embed
What would you like to do?
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
You can’t perform that action at this time.