diff options
author | Louis Chemineau <louis@chmn.me> | 2022-01-18 11:26:34 +0100 |
---|---|---|
committer | Louis Chemineau <louis@chmn.me> | 2022-01-18 11:29:51 +0100 |
commit | bca3ef60a3abb23951d7cc08f3841ad22b8d6dd0 (patch) | |
tree | aa6e986630f5d7244bdb676be26ac664478fb214 /autotest-js.sh | |
parent | c76eb85f0a14656d213f1fa20622dde9b0e1d00b (diff) | |
download | nextcloud-server-bca3ef60a3abb23951d7cc08f3841ad22b8d6dd0.tar.gz nextcloud-server-bca3ef60a3abb23951d7cc08f3841ad22b8d6dd0.zip |
Move jsunit dependencies to main package.json
Signed-off-by: Louis Chemineau <louis@chmn.me>
Diffstat (limited to 'autotest-js.sh')
-rwxr-xr-x | autotest-js.sh | 21 |
1 files changed, 3 insertions, 18 deletions
diff --git a/autotest-js.sh b/autotest-js.sh index b85357a79de..0b38084fff0 100755 --- a/autotest-js.sh +++ b/autotest-js.sh @@ -10,28 +10,13 @@ set -euo pipefail -NPM="$(which npm 2>/dev/null)" -PREFIX="build" - -if test -z "$NPM" -then - echo 'Node JS >= 0.8 is required to run the JavaScript tests' >&2 - exit 1 -fi - -# install test packages -mkdir -p "$PREFIX" -$NPM ci --prefix "$PREFIX" || exit 3 - # create scss test +# We use the deprecated node-sass module for that as the compilation fails with modern modules. See "DEPRECATION WARNING" during execution of this script. mkdir -p tests/css for SCSSFILE in core/css/*.scss do FILE=$(basename $SCSSFILE) - printf "\$webroot:''; @import 'functions.scss'; @import 'variables.scss'; @import '${FILE}';" | ./build/node_modules/.bin/node-sass --include-path core/css/ > tests/css/${FILE}.css + printf "\$webroot:''; @import 'functions.scss'; @import 'variables.scss'; @import '${FILE}';" | ./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 - +npm run test:jsunit
\ No newline at end of file |