test: update rewrite snapshots script

This commit is contained in:
Anton B 2023-06-15 17:59:19 -03:00
parent 0b1a7fbd82
commit 38425a0e16

View File

@ -1,7 +1,7 @@
#!/bin/bash
# Save string of folders containg reference snapshots files
folders_string=$(find . -type d -name "*js-snapshots" -printf "%h\n" | sort | uniq | tr -d './')
folders_string=$(find . -type d -name "*js-snapshots" -printf "%h\n" | sort | uniq | tr -d './' | tr '\n' ' ')
# Find folders
folders=$(find . -type d -name "*js-snapshots")
@ -12,5 +12,6 @@ do
rm -r "$folder"
done
echo "Running test suites: $folders_string"
# Run the test suites for these deleted folders
npm test "$folders_string" -- --project=chromium
npm test $folders_string -- --project=chromium