Skip to content

Commit

Permalink
Merge pull request #30567 from nextcloud/bugfix/noid/npm-ci-for-karma
Browse files Browse the repository at this point in the history
Use npm ci when running JS tests
  • Loading branch information
PVince81 authored Jan 10, 2022
2 parents 6572f80 + 6aba396 commit 8954e51
Show file tree
Hide file tree
Showing 25 changed files with 5,513 additions and 286 deletions.
3 changes: 3 additions & 0 deletions apps/files/src/files-app-settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ Object.assign(window.OCA.Files, { Settings: new Settings() })
Object.assign(window.OCA.Files.Settings, { Setting })

window.addEventListener('DOMContentLoaded', function() {
if (window.TESTING) {
return
}
// Init Vue app
// eslint-disable-next-line
new Vue({
Expand Down
6 changes: 4 additions & 2 deletions apps/files/src/main-personal-settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,7 @@ __webpack_nonce__ = btoa(getRequestToken())

Vue.prototype.t = t

const View = Vue.extend(PersonalSettings)
new View().$mount('#files-personal-settings')
if (!window.TESTING) {
const View = Vue.extend(PersonalSettings)
new View().$mount('#files-personal-settings')
}
4 changes: 3 additions & 1 deletion apps/systemtags/js/admin.js
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,8 @@
})();

window.addEventListener('DOMContentLoaded', function() {
OCA.SystemTags.Admin.init();
if (!window.TESTING) {
OCA.SystemTags.Admin.init();
}
});

2 changes: 1 addition & 1 deletion autotest-js.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ then
fi

# update/install test packages
mkdir -p "$PREFIX" && $NPM install --link --prefix "$PREFIX" || exit 3
mkdir -p "$PREFIX" && $NPM ci --link --prefix "$PREFIX" || exit 3

# create scss test
mkdir -p tests/css
Expand Down
Loading

0 comments on commit 8954e51

Please sign in to comment.