Move jsunit dependencies to main package.json

Signed-off-by: Louis Chemineau <louis@chmn.me>
This commit is contained in:
Louis Chemineau 2022-01-18 11:26:34 +01:00
parent c76eb85f0a
commit bca3ef60a3
18 changed files with 6273 additions and 10975 deletions

3
.gitattributes vendored
View File

@ -1,3 +1,2 @@
/dist/* binary
/package-lock.json binary
/build/package-lock.json binary
/package-lock.json binary

View File

@ -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

View File

@ -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

9548
build/package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -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.

BIN
dist/core-common.js vendored

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
dist/core-login.js vendored

Binary file not shown.

BIN
dist/core-login.js.map vendored

Binary file not shown.

BIN
dist/core-main.js vendored

Binary file not shown.

BIN
dist/core-main.js.map vendored

Binary file not shown.

Binary file not shown.

Binary file not shown.

7614
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -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"
}
}
}
}