Created
December 11, 2014 10:53
-
-
Save nwinkler/f6c2f278f3a92ed3ba4f to your computer and use it in GitHub Desktop.
Find Jasmine test cases that contain `ddescribe` or `iit` and print a message to stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# This script can be used to verify that there aren't any test cases containing ddescribe or iit. | |
# | |
# Steps: | |
# Finds the following files: *Spec.js, *.spec | |
# Checks whether the files contain one of the patterns "ddescribe" or "iit" | |
# If one of the patterns is found, exits with code 1 | |
find . -name *Spec.js -o -name *.spec | xargs grep -e "ddescribe" -e "iit" >&2 | |
if [ "$?" -eq "0" ] | |
then | |
echo "Testcases found with ddescribe or iit" >&2 | |
exit 1 | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment