зеркало из https://github.com/mozilla/fxa.git
Merge pull request #4801 from mozilla/root-test
chore(tests): made root level "npm test" more functional
This commit is contained in:
Коммит
b49a17a7a1
|
@ -0,0 +1,26 @@
|
||||||
|
#!/bin/bash -e
|
||||||
|
PACKAGE=$1
|
||||||
|
help="
|
||||||
|
Usage: npm test [all|<package-name>*]
|
||||||
|
|
||||||
|
examples:
|
||||||
|
|
||||||
|
npm test fxa-shared
|
||||||
|
npm test fxa-auth-db-mysql fxa-auth-server
|
||||||
|
npm test all
|
||||||
|
"
|
||||||
|
|
||||||
|
scopes=""
|
||||||
|
for scope in "$@"
|
||||||
|
do
|
||||||
|
scopes="$scopes --scope $scope"
|
||||||
|
done
|
||||||
|
|
||||||
|
if [[ -z "$PACKAGE" ]]; then
|
||||||
|
>&2 echo "$help"
|
||||||
|
exit 1
|
||||||
|
elif [[ "$PACKAGE" == "all" ]]; then
|
||||||
|
lerna run test --stream --no-prefix --loglevel success --concurrency 1 --ignore fxa-amplitude-send
|
||||||
|
else
|
||||||
|
echo "$scopes" | xargs lerna run test --stream --no-prefix --loglevel success --concurrency 1
|
||||||
|
fi
|
|
@ -12,7 +12,7 @@
|
||||||
"firefox": "./packages/fxa-dev-launcher/bin/fxa-dev-launcher",
|
"firefox": "./packages/fxa-dev-launcher/bin/fxa-dev-launcher",
|
||||||
"start-firefox": "npm run firefox",
|
"start-firefox": "npm run firefox",
|
||||||
"adb-reverse": "./_scripts/adb-reverse.sh",
|
"adb-reverse": "./_scripts/adb-reverse.sh",
|
||||||
"test": "lerna run test",
|
"test": "_scripts/test-package.sh",
|
||||||
"config-fxios": "node _scripts/config-fxios.js",
|
"config-fxios": "node _scripts/config-fxios.js",
|
||||||
"format": "lerna run format"
|
"format": "lerna run format"
|
||||||
},
|
},
|
||||||
|
|
Загрузка…
Ссылка в новой задаче