Skip to content

Commit b67e366

Browse files
committed
test: add script for running each test, useful for finding leaks
This script runs each test by itself through mocha, making it much easier to spot when a test leaks connections.
1 parent 380e0ee commit b67e366

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

test/tools/run_each_test.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/bin/bash
2+
3+
if [ "$#" -ne 1 ]; then
4+
echo "usage: run_each_test <test path>"
5+
exit
6+
fi
7+
8+
TEST_PATH=$1
9+
find $TEST_PATH -type f \( -iname "*_tests.js" ! -iname "*atlas*" ! -path "*node-next*" \) -exec npx mocha {} \;

0 commit comments

Comments
 (0)