Browse Source

Move jsunit dependencies to main package.json

Signed-off-by: Louis Chemineau <louis@chmn.me>
tags/v24.0.0beta1
Louis Chemineau 2 years ago
parent
commit
bca3ef60a3

+ 1
- 2
.gitattributes View File

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

+ 3
- 0
.github/workflows/node-tests.yml 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


+ 3
- 18
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

+ 0
- 9548
build/package-lock.json
File diff suppressed because it is too large
View File


+ 0
- 35
build/package.json 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"
}
}

+ 2
- 2
dist/comments-comments-app.js
File diff suppressed because it is too large
View File


+ 1
- 1
dist/comments-comments-app.js.map
File diff suppressed because it is too large
View File


+ 2
- 2
dist/core-common.js
File diff suppressed because it is too large
View File


+ 0
- 2
dist/core-common.js.LICENSE.txt View File

@@ -390,8 +390,6 @@
* Includes: widget.js, position.js, data.js, disable-selection.js, effect.js, effects/effect-blind.js, effects/effect-bounce.js, effects/effect-clip.js, effects/effect-drop.js, effects/effect-explode.js, effects/effect-fade.js, effects/effect-fold.js, effects/effect-highlight.js, effects/effect-puff.js, effects/effect-pulsate.js, effects/effect-scale.js, effects/effect-shake.js, effects/effect-size.js, effects/effect-slide.js, effects/effect-transfer.js, focusable.js, form-reset-mixin.js, jquery-patch.js, keycode.js, labels.js, scroll-parent.js, tabbable.js, unique-id.js, widgets/accordion.js, widgets/autocomplete.js, widgets/button.js, widgets/checkboxradio.js, widgets/controlgroup.js, widgets/datepicker.js, widgets/dialog.js, widgets/draggable.js, widgets/droppable.js, widgets/menu.js, widgets/mouse.js, widgets/progressbar.js, widgets/resizable.js, widgets/selectable.js, widgets/selectmenu.js, widgets/slider.js, widgets/sortable.js, widgets/spinner.js, widgets/tabs.js, widgets/tooltip.js
* Copyright jQuery Foundation and other contributors; Licensed MIT */

/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */

/**
*
*

+ 1
- 1
dist/core-common.js.map
File diff suppressed because it is too large
View File


+ 2
- 2
dist/core-login.js
File diff suppressed because it is too large
View File


+ 1
- 1
dist/core-login.js.map
File diff suppressed because it is too large
View File


+ 2
- 2
dist/core-main.js
File diff suppressed because it is too large
View File


+ 1
- 1
dist/core-main.js.map
File diff suppressed because it is too large
View File


+ 2
- 2
dist/workflowengine-workflowengine.js
File diff suppressed because it is too large
View File


+ 1
- 1
dist/workflowengine-workflowengine.js.map
File diff suppressed because it is too large
View File


+ 6425
- 1549
package-lock.json
File diff suppressed because it is too large
View File


+ 21
- 3
package.json 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"
}
}
}
}

Loading…
Cancel
Save