Skip to content

Instantly share code, notes, and snippets.

@mikeerickson
Last active January 3, 2019 22:25
Show Gist options
  • Save mikeerickson/958ea826703d70cfe43d4d807b785e94 to your computer and use it in GitHub Desktop.
Save mikeerickson/958ea826703d70cfe43d4d807b785e94 to your computer and use it in GitHub Desktop.
(SH) Script to execute mocha test stress tests
#!/bin/bash
ESC_SEQ="\x1b["
COL_RESET=${ESC_SEQ}"39;49;00m"
COL_BLUE=${ESC_SEQ}"34;01m"
COL_GREEN=${ESC_SEQ}"32;01m"
COL_CYAN=${ESC_SEQ}"36;01m"
ITERATIONS=${1:-5}
echo ""
for i in `seq 1 "$ITERATIONS"`; do
printf "${COL_CYAN}==> Running Stress Test: Iteration ${i} of ${ITERATIONS}...${COL_RESET}\n"
mocha test --reporter dot
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment