From bca3ef60a3abb23951d7cc08f3841ad22b8d6dd0 Mon Sep 17 00:00:00 2001 From: Louis Chemineau Date: Tue, 18 Jan 2022 11:26:34 +0100 Subject: Move jsunit dependencies to main package.json Signed-off-by: Louis Chemineau --- autotest-js.sh | 21 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-) (limited to 'autotest-js.sh') 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 -- cgit v1.2.3