diff --git a/git-commands/git-clean-pr b/git-commands/git-clean-pr index f20f3d14d43..5b14f29b923 100755 --- a/git-commands/git-clean-pr +++ b/git-commands/git-clean-pr @@ -92,19 +92,26 @@ if [[ ! -z "$jsxCommits" || ! -z "$jsCommits" ]]; then echo "running jest tests for $jsCommits"; echo ""; # use SCRIPT_DIR to get to appeals/client/test cd "$SCRIPT_DIR" + cd ../client + # check for autofix option in parameters # run -o for autofix jest and update snapshots for var in "$@" do if [ "$var" == "autofix" ]; then - cd ../client && yarn jest $var + yarn jest $var yarn jest --updateSnapshot - else - cd ../client && yarn jest + else + yarn jest fi done + if [ $# -eq 0 ] + then + yarn jest + fi + # run lint:fix yarn run lint:fix