diff options
author | Louis Chemineau <louis@chmn.me> | 2022-01-17 15:45:29 +0100 |
---|---|---|
committer | Louis Chemineau <louis@chmn.me> | 2022-01-18 11:03:00 +0100 |
commit | 16ba2940657973d67877500b283f02b471c812d4 (patch) | |
tree | dbfdc1097800c4a311ccc28712c21f65c3aa1b01 /autotest-js.sh | |
parent | a7eefa293e4735ab9f249f9d12ced3e70823da35 (diff) | |
download | nextcloud-server-16ba2940657973d67877500b283f02b471c812d4.tar.gz nextcloud-server-16ba2940657973d67877500b283f02b471c812d4.zip |
Migrate to npm 7 for autotest-js.sh
Signed-off-by: Louis Chemineau <louis@chmn.me>
Diffstat (limited to 'autotest-js.sh')
-rwxr-xr-x | autotest-js.sh | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/autotest-js.sh b/autotest-js.sh index a6936ec336f..b85357a79de 100755 --- a/autotest-js.sh +++ b/autotest-js.sh @@ -8,7 +8,7 @@ # @copyright 2014 Vincent Petry <pvince81@owncloud.com> # -# set -e +set -euo pipefail NPM="$(which npm 2>/dev/null)" PREFIX="build" @@ -19,19 +19,19 @@ then exit 1 fi -# update/install test packages -mkdir -p "$PREFIX" && $NPM ci --link --prefix "$PREFIX" || exit 3 +# install test packages +mkdir -p "$PREFIX" +$NPM ci --prefix "$PREFIX" || exit 3 # create scss test mkdir -p tests/css for SCSSFILE in core/css/*.scss do FILE=$(basename $SCSSFILE) - FILENAME="${FILE%.*}" - printf "\$webroot:''; @import 'functions.scss'; @import 'variables.scss'; @import '${FILE}';" | ./build/bin/node-sass --include-path core/css/ > tests/css/${FILE}.css + printf "\$webroot:''; @import 'functions.scss'; @import 'variables.scss'; @import '${FILE}';" | ./build/node_modules/.bin/node-sass --include-path core/css/ > tests/css/${FILE}.css done KARMA="$PREFIX/node_modules/karma/bin/karma" -NODE_PATH='build/node_modules' KARMA_TESTSUITE="$1" $KARMA start tests/karma.config.js --single-run +NODE_PATH='build/node_modules' KARMA_TESTSUITE="${1:-}" $KARMA start tests/karma.config.js --single-run |