Skip to content

Instantly share code, notes, and snippets.

@JamieMason
Created November 27, 2014 17:00
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save JamieMason/3711d0f292ad8899669b to your computer and use it in GitHub Desktop.
Save JamieMason/3711d0f292ad8899669b to your computer and use it in GitHub Desktop.
Run all CasperJS tests in a project using a glob file pattern.
#!/bin/bash
# Runs our end to end tests in casperjs.
# Run this script as follows from the project root;
#
# bin/run_e2e_tests
printf "\e[93m > SEARCHING FOR TEST FILES \033[0m \n"
find "$PWD" -iname "*.e2e.spec.js" -type f -print0 | while read -d '' -r file; do
"$PWD/node_modules/casperjs/bin/casperjs" test "$file"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment