Files
Ben Bangert ecb1a7f5ea fix: tweaks for test all to pass
Because:

* Test all didn't run in parallel to take advantage of more cores and
  a few older tests were flakey.
* Tests would hang as packages had a default test that was in watch
  mode.

This commit:

* Updates several flakey tests and runs the test all in parallel for a
  shorter completion time.
* Updates settings and payment-server packages to have new watch command
  and deafult test command that runs the tests.

Closes #FXA-6096
2022-10-18 15:26:45 -07:00

27 lines
563 B
Bash
Executable File

#!/bin/bash -e
PACKAGE=$1
help="
Usage: npm test [all|<package-name>*]
examples:
npm test fxa-shared
npm test all
"
workspaces=""
for workspace in "$@"
do
workspaces="$workspaces --include $workspace"
done
if [[ -z "$PACKAGE" ]]; then
>&2 echo "$help"
exit 1
elif [[ "$PACKAGE" == "all" ]]; then
yarn stop && yarn start infrastructure && \
yarn workspaces foreach --topological-dev -v -p --exclude '*fxa-content-server*' --exclude '*functional-tests*' run test
else
echo "$workspaces run test" | xargs yarn workspaces foreach --topological-dev
fi