Skip to content

Commit 8a218d0

Browse files
committed
use explicit test config if jest config exists
1 parent a1be97b commit 8a218d0

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

scripts/run-all-cdk-tests.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@ run_test(){
1010
local workdir=$1
1111
cd "$workdir" || exit 1
1212
echo "Running tests for $workdir"
13+
if [ -f "jest.config.js" ]; then
14+
echo "Using jest configuration at ${workdir}jest.config.js"
15+
npx jest --config jest.config.js
16+
else
17+
npx jest
18+
fi
1319
npm run test
1420
if [ $? -ne 0 ]; then
1521
echo "Tests failed for $workdir"

0 commit comments

Comments
 (0)