-
Notifications
You must be signed in to change notification settings - Fork 108
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
79 additions
and
7 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#!/bin/sh | ||
|
||
out=$(mktemp) | ||
# make silent background | ||
npx mocha --watch 2>>$out.err 1>>$out & | ||
|
||
PID=$! | ||
#echo pid of mocha: $PID | ||
|
||
echo "Round 1" >> out | ||
touch src/fake-timers-src.js | ||
sleep 3 | ||
echo "Round 2" >> out | ||
touch src/fake-timers-src.js | ||
sleep 2 | ||
echo "Cleanup" >> out | ||
|
||
# Kill the process manually | ||
kill $PID >/dev/null | ||
kill -9 $PID >/dev/null | ||
|
||
#cat $out.err | ||
if grep failing $out; then | ||
echo "This means some tests do not clean up after themselves or otherwise do not work in Mocha's watch mode" | ||
echo "See $out for details or run $0 yourself" | ||
exit 1 | ||
fi | ||
exit 0 |
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