mirror of https://github.com/nextcloud/server
Move jsunit dependencies to main package.json
Signed-off-by: Louis Chemineau <louis@chmn.me>
This commit is contained in:
parent
c76eb85f0a
commit
bca3ef60a3
|
@ -1,3 +1,2 @@
|
|||
/dist/* binary
|
||||
/package-lock.json binary
|
||||
/build/package-lock.json binary
|
||||
/package-lock.json binary
|
|
@ -63,6 +63,9 @@ jobs:
|
|||
- name: Set up npm ${{ needs.versions.outputs.npmVersion }}
|
||||
run: npm i -g npm@"${{ needs.versions.outputs.npmVersion }}"
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
|
||||
- name: Test
|
||||
run: ./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
|
File diff suppressed because it is too large
Load Diff
|
@ -1,35 +0,0 @@
|
|||
{
|
||||
"name": "nextcloud-js-tests",
|
||||
"description": "Nextcloud tests",
|
||||
"version": "0.0.2",
|
||||
"author": {
|
||||
"name": "Vincent Petry",
|
||||
"email": "vincent@nextcloud.com"
|
||||
},
|
||||
"private": true,
|
||||
"homepage": "https://github.com/nextcloud/",
|
||||
"contributors": [],
|
||||
"devDependencies": {
|
||||
"handlebars": "^4.7.7",
|
||||
"jasmine-core": "~2.5.2",
|
||||
"jasmine-sinon": "^0.4.0",
|
||||
"jsdoc": "^3.6.7",
|
||||
"karma": "^6.3.11",
|
||||
"karma-chrome-launcher": "^3.1.0",
|
||||
"karma-coverage": "2.1.0",
|
||||
"karma-jasmine": "^1.1.2",
|
||||
"karma-jasmine-sinon": "^1.0.4",
|
||||
"karma-spec-reporter": "^0.0.33",
|
||||
"karma-viewport": "^1.0.8",
|
||||
"node-sass": "~7.0.1",
|
||||
"puppeteer": "^13.1.0",
|
||||
"sinon": "<= 5.0.7"
|
||||
},
|
||||
"overrides": {
|
||||
"colors": "1.4.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^14.0.0",
|
||||
"npm": "^7.0.0"
|
||||
}
|
||||
}
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
24
package.json
24
package.json
|
@ -14,7 +14,8 @@
|
|||
"lint": "eslint '**/src/**/*.{vue,js}'",
|
||||
"lint:fix": "eslint '**/src/**/*.{vue,js}' --fix",
|
||||
"test": "jest",
|
||||
"test:watch": "jest --watch"
|
||||
"test:watch": "jest --watch",
|
||||
"test:jsunit": "karma start tests/karma.config.js --single-run"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
@ -124,7 +125,21 @@
|
|||
"vue-template-compiler": "^2.6.14",
|
||||
"webpack": "^5.66.0",
|
||||
"webpack-cli": "^4.9.1",
|
||||
"webpack-merge": "^5.8.0"
|
||||
"webpack-merge": "^5.8.0",
|
||||
"handlebars": "^4.7.7",
|
||||
"jasmine-core": "~2.5.2",
|
||||
"jasmine-sinon": "^0.4.0",
|
||||
"jsdoc": "^3.6.7",
|
||||
"karma": "^6.3.11",
|
||||
"karma-chrome-launcher": "^3.1.0",
|
||||
"karma-coverage": "2.1.0",
|
||||
"karma-jasmine": "^1.1.2",
|
||||
"karma-jasmine-sinon": "^1.0.4",
|
||||
"karma-spec-reporter": "^0.0.33",
|
||||
"karma-viewport": "^1.0.8",
|
||||
"node-sass": "~6.0.1",
|
||||
"puppeteer": "^13.1.0",
|
||||
"sinon": "<= 5.0.7"
|
||||
},
|
||||
"browserslist": [
|
||||
"extends @nextcloud/browserslist-config"
|
||||
|
@ -133,6 +148,9 @@
|
|||
"node": "^14.0.0",
|
||||
"npm": "^7.0.0"
|
||||
},
|
||||
"overrides": {
|
||||
"colors": "1.4.0"
|
||||
},
|
||||
"jest": {
|
||||
"moduleFileExtensions": [
|
||||
"js",
|
||||
|
@ -146,4 +164,4 @@
|
|||
"^.+\\.vue$": "vue-jest"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue