Signed-off-by: Louis Chemineau <louis@chmn.me>tags/v24.0.0beta1
/dist/* binary | /dist/* binary | ||||
/package-lock.json binary | |||||
/build/package-lock.json binary | |||||
/package-lock.json binary |
- name: Set up npm ${{ needs.versions.outputs.npmVersion }} | - name: Set up npm ${{ needs.versions.outputs.npmVersion }} | ||||
run: npm i -g npm@"${{ needs.versions.outputs.npmVersion }}" | run: npm i -g npm@"${{ needs.versions.outputs.npmVersion }}" | ||||
- name: Install dependencies | |||||
run: npm ci | |||||
- name: Test | - name: Test | ||||
run: ./autotest-js.sh | run: ./autotest-js.sh | ||||
set -euo pipefail | 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 | # 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 | mkdir -p tests/css | ||||
for SCSSFILE in core/css/*.scss | for SCSSFILE in core/css/*.scss | ||||
do | do | ||||
FILE=$(basename $SCSSFILE) | 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 | 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 |
{ | |||||
"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" | |||||
} | |||||
} |
* 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 | * 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 */ | * Copyright jQuery Foundation and other contributors; Licensed MIT */ | ||||
/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */ | |||||
/** | /** | ||||
* | * | ||||
* | * |
"lint": "eslint '**/src/**/*.{vue,js}'", | "lint": "eslint '**/src/**/*.{vue,js}'", | ||||
"lint:fix": "eslint '**/src/**/*.{vue,js}' --fix", | "lint:fix": "eslint '**/src/**/*.{vue,js}' --fix", | ||||
"test": "jest", | "test": "jest", | ||||
"test:watch": "jest --watch" | |||||
"test:watch": "jest --watch", | |||||
"test:jsunit": "karma start tests/karma.config.js --single-run" | |||||
}, | }, | ||||
"repository": { | "repository": { | ||||
"type": "git", | "type": "git", | ||||
"vue-template-compiler": "^2.6.14", | "vue-template-compiler": "^2.6.14", | ||||
"webpack": "^5.66.0", | "webpack": "^5.66.0", | ||||
"webpack-cli": "^4.9.1", | "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": [ | "browserslist": [ | ||||
"extends @nextcloud/browserslist-config" | "extends @nextcloud/browserslist-config" | ||||
"node": "^14.0.0", | "node": "^14.0.0", | ||||
"npm": "^7.0.0" | "npm": "^7.0.0" | ||||
}, | }, | ||||
"overrides": { | |||||
"colors": "1.4.0" | |||||
}, | |||||
"jest": { | "jest": { | ||||
"moduleFileExtensions": [ | "moduleFileExtensions": [ | ||||
"js", | "js", | ||||
"^.+\\.vue$": "vue-jest" | "^.+\\.vue$": "vue-jest" | ||||
} | } | ||||
} | } | ||||
} | |||||
} |