diff --git a/client/templates/meetingseries/helpers/tabFilterDatabaseOperations.js b/client/templates/meetingseries/helpers/tabFilterDatabaseOperations.js index f72d726e0..8ddf4aeec 100644 --- a/client/templates/meetingseries/helpers/tabFilterDatabaseOperations.js +++ b/client/templates/meetingseries/helpers/tabFilterDatabaseOperations.js @@ -6,7 +6,7 @@ export function createLabelIdsReceiver(parentMeetingSeriesId) { const label = Label.findLabelsContainingSubstring( parentMeetingSeriesId, labelName, - caseSensitive + caseSensitive, ); if (label !== null) { return label.map((label) => { @@ -17,9 +17,10 @@ export function createLabelIdsReceiver(parentMeetingSeriesId) { }; } export function createUserIdsReceiver(userName) { - const users = userName === "me" - ? [Meteor.user()] - : Meteor.users.find({ username: { $regex: userName } }).fetch(); + const users = + userName === "me" + ? [Meteor.user()] + : Meteor.users.find({ username: { $regex: userName } }).fetch(); if (users) { return users.map((user) => { return user._id; diff --git a/imports/infoitem.js b/imports/infoitem.js index 99551021b..95d8b2e5c 100644 --- a/imports/infoitem.js +++ b/imports/infoitem.js @@ -7,6 +7,7 @@ import { _ } from "lodash"; import { Meteor } from "meteor/meteor"; import { Random } from "meteor/random"; + import { formatDateISO8601 } from "./helpers/date.js"; import { StringUtils } from "./helpers/string-utils.js"; import { User } from "./user.js"; diff --git a/imports/ldap/getLDAPUsers.js b/imports/ldap/getLDAPUsers.js index fce83db10..5725c99dd 100644 --- a/imports/ldap/getLDAPUsers.js +++ b/imports/ldap/getLDAPUsers.js @@ -74,11 +74,7 @@ const _fetchLDAPUsers = (connection) => { const settings = connection.settings; const base = settings.serverDn; const searchDn = get(settings, "propertyMap.username", "cn"); - const userLongNameAttribute = get( - settings, - "propertyMap.longname", - searchDn, - ); + const userLongNameAttribute = get(settings, "propertyMap.longname", searchDn); const emailAttribute = get(settings, "propertyMap.email", searchDn); const filter = `(&(${searchDn}=*)${settings.searchFilter})`; const scope = "sub"; diff --git a/imports/ldap/saveUsers.js b/imports/ldap/saveUsers.js index fe71a10a8..54e412e76 100644 --- a/imports/ldap/saveUsers.js +++ b/imports/ldap/saveUsers.js @@ -1,10 +1,11 @@ -import { MongoClient as mongo } from "mongodb"; +import { forEach, map } from "lodash"; import { parse } from "mongo-uri"; -import transformUser from "./transformUser"; +import { MongoClient as mongo } from "mongodb"; -import { map, forEach } from "lodash"; import { generateId } from "../../tests/performance/fixtures/lib/random"; +import transformUser from "./transformUser"; + const _transformUsers = (settings, users) => map(users, (user) => transformUser(settings, user)); @@ -55,7 +56,9 @@ const _insertUsers = (client, mongoUri, users) => { } else { const stringifiedUser = JSON.stringify(user, null, 2); console.log( - `SKIPPED INVALID USER (no username or no valid emails[0].address): ${stringifiedUser}`, + `SKIPPED INVALID USER (no username or no valid emails[0].address): ${ + stringifiedUser + }`, ); } }); diff --git a/imports/ldap/transformUser.js b/imports/ldap/transformUser.js index 082039b7e..8fe3d3240 100644 --- a/imports/ldap/transformUser.js +++ b/imports/ldap/transformUser.js @@ -7,11 +7,11 @@ import { pick } from "lodash"; * @param {...*} args - The values to exclude from the filtered array. * @returns {Array} - A new array with the values excluded. */ -const without = (arr, ...args) => arr.filter(item => !args.includes(item)) +const without = (arr, ...args) => arr.filter((item) => !args.includes(item)); export default (ldapSettings, userData) => { ldapSettings.propertyMap = ldapSettings.propertyMap || {}; const usernameAttribute = - ldapSettings.searchDn || ldapSettings.propertyMap.username || "cn"; + ldapSettings.searchDn || ldapSettings.propertyMap.username || "cn"; const longnameAttribute = ldapSettings.propertyMap.longname; const mailAttribute = ldapSettings.propertyMap.email || "mail"; diff --git a/imports/priority.js b/imports/priority.js index 267723185..a81ef7b95 100644 --- a/imports/priority.js +++ b/imports/priority.js @@ -1,5 +1,5 @@ -import { __ } from "meteor/universe:i18n"; import assert from "assert"; +import { __ } from "meteor/universe:i18n"; // #I18N - Attention: the below strings with longer texts will be never be used // in UI! Instead they will be pulled from translation language files via diff --git a/imports/server/exportimport/expImpFilesAttachments.js b/imports/server/exportimport/expImpFilesAttachments.js index 836066d8a..4343e5154 100644 --- a/imports/server/exportimport/expImpFilesAttachments.js +++ b/imports/server/exportimport/expImpFilesAttachments.js @@ -1,5 +1,5 @@ -import { writeFileSync, readFileSync } from "fs"; -import { stringify, parse } from "bson"; +import { parse, stringify } from "bson"; +import { readFileSync, writeFileSync } from "fs"; class ExpImpFilesAttachments { static get FILENAME_POSTFIX() { @@ -37,9 +37,7 @@ class ExpImpFilesAttachments { const attachmentFile = msID + ExpImpFilesAttachments.FILENAME_POSTFIX; let AllAttachmentsDoc = undefined; try { - AllAttachmentsDoc = parse( - readFileSync(attachmentFile, "utf8"), - ); + AllAttachmentsDoc = parse(readFileSync(attachmentFile, "utf8")); if (!AllAttachmentsDoc) { return reject(`Could not read attachment file ${attachmentFile}`); } diff --git a/imports/server/exportimport/expImpFilesDocuments.js b/imports/server/exportimport/expImpFilesDocuments.js index 91fa3c172..003c3f2b1 100644 --- a/imports/server/exportimport/expImpFilesDocuments.js +++ b/imports/server/exportimport/expImpFilesDocuments.js @@ -1,5 +1,5 @@ -import { writeFileSync, readFileSync } from "fs"; -import { stringify, parse } from "bson"; +import { parse, stringify } from "bson"; +import { readFileSync, writeFileSync } from "fs"; class ExpImpFilesDocuments { static get FILENAME_POSTFIX() { diff --git a/imports/server/exportimport/expImpMeetingseries.js b/imports/server/exportimport/expImpMeetingseries.js index f4c0d500f..a5a1c94e9 100644 --- a/imports/server/exportimport/expImpMeetingseries.js +++ b/imports/server/exportimport/expImpMeetingseries.js @@ -1,5 +1,5 @@ -import { writeFileSync, readFileSync } from "fs"; -import { stringify, parse } from "bson"; +import { parse, stringify } from "bson"; +import { readFileSync, writeFileSync } from "fs"; class ExpImpMeetingSeries { static get FILENAME_POSTFIX() { diff --git a/imports/server/exportimport/expImpMinutes.js b/imports/server/exportimport/expImpMinutes.js index e3c0a573f..2df10498d 100644 --- a/imports/server/exportimport/expImpMinutes.js +++ b/imports/server/exportimport/expImpMinutes.js @@ -1,5 +1,6 @@ -import { writeFileSync, readFileSync } from "fs"; -import { stringify, parse } from "bson"; +import { parse, stringify } from "bson"; +import { readFileSync, writeFileSync } from "fs"; + import { patchUsers as _patchUsers } from "./expImpTopics"; class ExpImpMinutes { diff --git a/imports/server/exportimport/expImpSchema.js b/imports/server/exportimport/expImpSchema.js index 31fcb9f86..aa9c7ed2b 100644 --- a/imports/server/exportimport/expImpSchema.js +++ b/imports/server/exportimport/expImpSchema.js @@ -1,5 +1,5 @@ -import { writeFileSync, readFileSync } from "fs"; -import { stringify, parse } from "bson"; +import { parse, stringify } from "bson"; +import { readFileSync, writeFileSync } from "fs"; class ExpImpSchema { static get MADE_FOR_SCHEMA() { @@ -20,10 +20,14 @@ class ExpImpSchema { if (ExpImpSchema.MADE_FOR_SCHEMA !== doc.version) { console.log("*** WARNING *** Schema mismatch!"); console.log( - ` This exporter is made for database schema version: ${ExpImpSchema.MADE_FOR_SCHEMA}`, + ` This exporter is made for database schema version: ${ + ExpImpSchema.MADE_FOR_SCHEMA + }`, ); console.log( - ` But your database has schema version : ${doc.version}`, + ` But your database has schema version : ${ + doc.version + }`, ); console.log( " Alyways migrate to the most recent DB schema before export!", @@ -72,13 +76,19 @@ class ExpImpSchema { ) { console.log("*** WARNING *** Schema mismatch!"); console.log( - ` This importer is made for database schema version: ${ExpImpSchema.MADE_FOR_SCHEMA}`, + ` This importer is made for database schema version: ${ + ExpImpSchema.MADE_FOR_SCHEMA + }`, ); console.log( - ` Your database has schema version : ${doc.version}`, + ` Your database has schema version : ${ + doc.version + }`, ); console.log( - ` Your exported data has schema version : ${exportedSchema.version}`, + ` Your exported data has schema version : ${ + exportedSchema.version + }`, ); console.log( " Alyways migrate to the most recent DB schema before export/import!", diff --git a/imports/server/exportimport/expImpTopics.js b/imports/server/exportimport/expImpTopics.js index 82ad821e3..3e28e1a33 100644 --- a/imports/server/exportimport/expImpTopics.js +++ b/imports/server/exportimport/expImpTopics.js @@ -1,5 +1,5 @@ -import { writeFileSync, readFileSync } from "fs"; -import { stringify, parse } from "bson"; +import { parse, stringify } from "bson"; +import { readFileSync, writeFileSync } from "fs"; class ExpImpTopics { static get FILENAME_POSTFIX() { diff --git a/imports/server/exportimport/expImpUsers.js b/imports/server/exportimport/expImpUsers.js index 51bfd8625..d456315f3 100644 --- a/imports/server/exportimport/expImpUsers.js +++ b/imports/server/exportimport/expImpUsers.js @@ -1,5 +1,5 @@ -import { writeFileSync, readFileSync } from "fs"; -import { stringify, parse } from "bson"; +import { parse, stringify } from "bson"; +import { readFileSync, writeFileSync } from "fs"; class ExpImpUsers { static get FILENAME_POSTFIX() { @@ -108,11 +108,15 @@ class ExpImpUsers { if (doc) { console.log(`Found ${doc.length} target users in current user DB.`); console.log( - `Will copy over ${usrCopyIDs.length} export users to current user DB.`, + `Will copy over ${ + usrCopyIDs.length + } export users to current user DB.`, ); if (doc.length !== usrMapTargetIDs.length) { return reject( - `Not all to-be patched target users found in current user DB: ${usrMapTargetIDs}`, + `Not all to-be patched target users found in current user DB: ${ + usrMapTargetIDs + }`, ); } // Check#2: All copy-users MUST NOT exist! diff --git a/private/exportMeetingSeries.js b/private/exportMeetingSeries.js index cf1926ad6..4d6956de0 100644 --- a/private/exportMeetingSeries.js +++ b/private/exportMeetingSeries.js @@ -5,15 +5,19 @@ */ import { MongoClient as mongo } from "mongodb"; -import { MADE_FOR_SCHEMA, exportCheck } from "../imports/server/exportimport/expImpSchema"; +import { bindHelp, create, showHelp } from "node-getopt"; + +import { doExport as ___doExport } from "../imports/server/exportimport/expImpFilesAttachments"; +import { doExport as ____doExport } from "../imports/server/exportimport/expImpFilesDocuments"; import { doExport } from "../imports/server/exportimport/expImpMeetingseries"; import { doExport as _doExport } from "../imports/server/exportimport/expImpMinutes"; +import { + exportCheck, + MADE_FOR_SCHEMA, +} from "../imports/server/exportimport/expImpSchema"; import { doExport as __doExport } from "../imports/server/exportimport/expImpTopics"; -import { doExport as ___doExport } from "../imports/server/exportimport/expImpFilesAttachments"; -import { doExport as ____doExport } from "../imports/server/exportimport/expImpFilesDocuments"; import { doExport as _____doExport } from "../imports/server/exportimport/expImpUsers"; -import { create, bindHelp, showHelp } from "node-getopt"; create([ ["i", "id=[ARG]", "ID of meeting series, e.g. icwrCdJjqWpoH9ugQ"], ["m", "mongourl=[ARG]", "Mongo DB url, e.g. mongodb://localhost:3101/meteor"], @@ -43,7 +47,9 @@ const _connectMongo = function (mongoUrl) { console.log(""); console.log( - `*** 4Minitz MeetingSeries Export Tool *** (made for schema version: ${MADE_FOR_SCHEMA})`, + `*** 4Minitz MeetingSeries Export Tool *** (made for schema version: ${ + MADE_FOR_SCHEMA + })`, ); _connectMongo(mongoUrl) .then((db) => { diff --git a/private/importMeetingSeries.js b/private/importMeetingSeries.js index d15667542..fe8b49c6e 100644 --- a/private/importMeetingSeries.js +++ b/private/importMeetingSeries.js @@ -7,6 +7,7 @@ import { spawnSync } from "child_process"; import { MongoClient as mongo } from "mongodb"; import { bindHelp, create, showHelp } from "node-getopt"; + import { ExpImpFileAttachments } from "../imports/server/exportimport/expImpFilesAttachments"; import { ExpImpFileDocuments } from "../imports/server/exportimport/expImpFilesDocuments"; import { ExpImpMeetingSeries } from "../imports/server/exportimport/expImpMeetingseries"; @@ -45,17 +46,19 @@ const _connectMongo = (mongoUrl) => console.log(""); console.log( - `*** 4Minitz MeetingSeries Import Tool *** (made for schema version: ${ExpImpSchema.MADE_FOR_SCHEMA})` + `*** 4Minitz MeetingSeries Import Tool *** (made for schema version: ${ + ExpImpSchema.MADE_FOR_SCHEMA + })`, ); console.log("*** ATTENTION ***"); console.log( - "- This script will import a meeting series and all dependecies to your DB." + "- This script will import a meeting series and all dependecies to your DB.", ); console.log( - "- This script has to change existing user roles, so users can access the new data." + "- This script has to change existing user roles, so users can access the new data.", ); console.log( - "- This script may overwrite edited data if you import the same data multiple times." + "- This script may overwrite edited data if you import the same data multiple times.", ); console.log("So, this script is DANGEROUS!!!"); console.log("Experts only!"); diff --git a/programs/generateLicenseList.js b/programs/generateLicenseList.js index f4187d09d..6d61eb305 100644 --- a/programs/generateLicenseList.js +++ b/programs/generateLicenseList.js @@ -1,7 +1,7 @@ -import { dumpLicenses } from "npm-license-crawler"; +import { createWriteStream } from "fs"; import { get as _get } from "http"; import { get as __get } from "https"; -import { createWriteStream } from "fs"; +import { dumpLicenses } from "npm-license-crawler"; const meteorPackages = { meteor: { diff --git a/programs/postInstall.js b/programs/postInstall.js index 061ffa54c..3f09103b9 100644 --- a/programs/postInstall.js +++ b/programs/postInstall.js @@ -1,5 +1,5 @@ "use strict"; -import pkg from 'fs-extra'; +import pkg from "fs-extra"; const { copySync, removeSync } = pkg; console.log("copy bootstrap fonts to the public folder"); diff --git a/tests/support/end2end-server.js b/tests/support/end2end-server.js index 9da50fdc3..d0b278d1c 100644 --- a/tests/support/end2end-server.js +++ b/tests/support/end2end-server.js @@ -1,5 +1,7 @@ -import run from "./lib/task.js"; import { createInterface, on } from "readline"; + +import run from "./lib/task.js"; + function logTask(taskname) { return (data) => { process.stdout.write(`${taskname}: ${data}`); diff --git a/tests/support/ldap-server.js b/tests/support/ldap-server.js index 97abeab54..eb6da1721 100644 --- a/tests/support/ldap-server.js +++ b/tests/support/ldap-server.js @@ -3,8 +3,14 @@ * @module ldap-server */ -import pkg from 'ldapjs'; -const { createServer, InsufficientAccessRightsError, UnwillingToPerformError, NoSuchObjectError, InvalidCredentialsError } = pkg +import pkg from "ldapjs"; +const { + createServer, + InsufficientAccessRightsError, + UnwillingToPerformError, + NoSuchObjectError, + InvalidCredentialsError, +} = pkg; /** * Array of user objects representing LDAP users. diff --git a/tests/unit/client/helpers/submitOnEnter.test.js b/tests/unit/client/helpers/submitOnEnter.test.js index a60ab13ad..91e07d104 100644 --- a/tests/unit/client/helpers/submitOnEnter.test.js +++ b/tests/unit/client/helpers/submitOnEnter.test.js @@ -4,11 +4,19 @@ import sinon from "sinon"; const jQueryOnStub = sinon.stub(); -const submitOnEnter = await esmock("../../../../client/helpers/submitOnEnter", { - "meteor/jquery": { $: () => sinon.stub().returns({ on: jQueryOnStub, }) }, -}, {}, { - isModuleNotFoundError: false -}).default; +const submitOnEnter = await esmock( + "../../../../client/helpers/submitOnEnter", + { + "meteor/jquery": { + $: () => + sinon.stub().returns({ + on: jQueryOnStub, + }), + }, + }, + {}, + { isModuleNotFoundError: false }, +).default; // skipcq: JS-0241 describe("submitOnEnter", function () { diff --git a/tests/unit/imports/ActionItem.test.js b/tests/unit/imports/ActionItem.test.js index 7dc3edde3..f42968b8a 100644 --- a/tests/unit/imports/ActionItem.test.js +++ b/tests/unit/imports/ActionItem.test.js @@ -6,43 +6,58 @@ const doNothing = () => {}; class MeteorError {} -const { Priority } = await esmock("../../../imports/priority", { - "meteor/universe:i18n": { __: () => sinon.stub() } -}, {}, { - isModuleNotFoundError: false -}); +const { Priority } = await esmock( + "../../../imports/priority", + { "meteor/universe:i18n": { __: () => sinon.stub() } }, + {}, + { isModuleNotFoundError: false }, +); -const { InfoItem } = await esmock("../../../imports/infoitem", { - "meteor/meteor": { - Meteor: { - call: () => sinon.stub(), - Error: MeteorError, - user: () => { - return { username: "unit-test" }; +const { InfoItem } = await esmock( + "../../../imports/infoitem", + { + "meteor/meteor": { + Meteor: { + call: () => sinon.stub(), + Error: MeteorError, + user: () => { + return { username: "unit-test" }; + }, }, - }, }, - "meteor/random": { Random: { id: () => {}, } }, - "/imports/user": { null: null, "@noCallThru": true }, - "./topic": { Topic: {} }, // These might need to be arrows? - "./label": { Label: {} }, -}, {}, { - isModuleNotFoundError: false -}); + }, + "meteor/random": { + Random: { + id: () => {}, + }, + }, + "/imports/user": { null: null, "@noCallThru": true }, + "./topic": { Topic: {} }, // These might need to be arrows? + "./label": { Label: {} }, + }, + {}, + { isModuleNotFoundError: false }, +); -const { ActionItem } = await esmock("../../../imports/actionitem", { - "meteor/meteor": { // Dunno if I have to repeat this? - Meteor: { - call: () => sinon.stub(), - Error: MeteorError, - user: () => { - return { username: "unit-test" }; +const { ActionItem } = await esmock( + "../../../imports/actionitem", + { + "meteor/meteor": { + // Dunno if I have to repeat this? + Meteor: { + call: () => sinon.stub(), + Error: MeteorError, + user: () => { + return { username: "unit-test" }; + }, }, - }, }, - // "/imports/priority": { Priority, "@noCallThru": true }, Unsure if I need to mock these to the constants, or just mock combine mock statements? - // "./infoitem": { InfoItem, "@noCallThru": true }, -}, {}, { - isModuleNotFoundError: false -}); + }, + // "/imports/priority": { Priority, "@noCallThru": true }, Unsure if I need to + // mock these to the constants, or just mock combine mock statements? + // "./infoitem": { InfoItem, "@noCallThru": true }, + }, + {}, + { isModuleNotFoundError: false }, +); // skipcq: JS-0241 describe("ActionItem", function () { let dummyTopic, infoItemDoc; diff --git a/tests/unit/imports/InfoItem.test.js b/tests/unit/imports/InfoItem.test.js index cd84e6e2f..b697ffd58 100644 --- a/tests/unit/imports/InfoItem.test.js +++ b/tests/unit/imports/InfoItem.test.js @@ -2,6 +2,7 @@ import { expect } from "chai"; import _ from "lodash"; import proxyquire from "proxyquire"; import sinon from "sinon"; + import { subElementsHelper } from "../../../imports/helpers/subElements"; const Topic = {}; diff --git a/tests/unit/imports/client/ResponsiblePreparer.test.js b/tests/unit/imports/client/ResponsiblePreparer.test.js index b9e02da3b..1039feecb 100644 --- a/tests/unit/imports/client/ResponsiblePreparer.test.js +++ b/tests/unit/imports/client/ResponsiblePreparer.test.js @@ -1,6 +1,7 @@ import { faker } from "@faker-js/faker"; import { expect } from "chai"; import _ from "lodash"; + import { ParticipantsPreparer } from "../../../../imports/client/ParticipantsPreparer"; const generateId = () => { diff --git a/tests/unit/imports/helpers/string-utils.test.js b/tests/unit/imports/helpers/string-utils.test.js index f4261d085..1afc0c919 100644 --- a/tests/unit/imports/helpers/string-utils.test.js +++ b/tests/unit/imports/helpers/string-utils.test.js @@ -1,4 +1,5 @@ import { expect } from "chai"; + import { StringUtils } from "../../../../imports/helpers/string-utils"; // skipcq: JS-0241 diff --git a/tests/unit/imports/helpers/subElements.test.js b/tests/unit/imports/helpers/subElements.test.js index d3e4ac725..af35293a2 100644 --- a/tests/unit/imports/helpers/subElements.test.js +++ b/tests/unit/imports/helpers/subElements.test.js @@ -1,5 +1,7 @@ import { expect } from "chai"; + import { subElementsHelper } from "../../../../imports/helpers/subElements"; + // skipcq JS-0241 describe("subElementsHelper", function () { // skipcq JS-0241 diff --git a/tests/unit/imports/ldap/getLDAPUsers.test.js b/tests/unit/imports/ldap/getLDAPUsers.test.js index dbcf1de60..74a7ee751 100644 --- a/tests/unit/imports/ldap/getLDAPUsers.test.js +++ b/tests/unit/imports/ldap/getLDAPUsers.test.js @@ -1,6 +1,7 @@ import { expect } from "chai"; import proxyquire from "proxyquire"; import sinon from "sinon"; + import asyncStubs from "../../../support/lib/asyncStubs"; const ldap = { @@ -369,7 +370,9 @@ describe("getLDAPUsers", function () { const value = Math.pow(2, i), expectedResult = i === 1 ? inactiveUsers : activeUsers; it( - `uAC property set to ${value}: returns user object with isInactive === ${expectedResult}`, + `uAC property set to ${ + value + }: returns user object with isInactive === ${expectedResult}`, generateTestCase(value, expectedResult), ); } diff --git a/tests/unit/imports/ldap/saveUsers.test.js b/tests/unit/imports/ldap/saveUsers.test.js index b2aa6b93e..ad7ac2496 100644 --- a/tests/unit/imports/ldap/saveUsers.test.js +++ b/tests/unit/imports/ldap/saveUsers.test.js @@ -1,6 +1,7 @@ import { expect } from "chai"; import esmock from "esmock"; import sinon from "sinon"; + import asyncStubs from "../../../support/lib/asyncStubs"; const bulk = { @@ -36,7 +37,8 @@ const users = [ }, ]; -//This may require strict mocking? esmock.strict() or import { strict as esmock } from 'esmock' In which case mongodb should be changed to MongoClient +// This may require strict mocking? esmock.strict() or import { strict as esmock +// } from 'esmock' In which case mongodb should be changed to MongoClient const saveUsers = await esmock("../../../../imports/ldap/saveUsers", { mongodb: { connect: () => sinon.stub().resolves() }, randomstring: { generate: () => sinon.stub().returns("123abc") }, diff --git a/tests/unit/imports/services/finalize-minutes/finalizer.test.js b/tests/unit/imports/services/finalize-minutes/finalizer.test.js index f7c19ca21..0b1722d60 100644 --- a/tests/unit/imports/services/finalize-minutes/finalizer.test.js +++ b/tests/unit/imports/services/finalize-minutes/finalizer.test.js @@ -40,7 +40,6 @@ const Meteor = { settings: { public: { docGeneration: { enabled: true } } }, }; - const GlobalSettings = { isEMailDeliveryEnabled: sinon.stub().returns(false), getDefaultEmailSenderAddress: sinon.stub().returns("noreply@example.com"), diff --git a/tests/unit/server/migrations/migrate_v1.test.js b/tests/unit/server/migrations/migrate_v1.test.js index 01df25804..0074a72ae 100644 --- a/tests/unit/server/migrations/migrate_v1.test.js +++ b/tests/unit/server/migrations/migrate_v1.test.js @@ -2,7 +2,6 @@ import { expect } from "chai"; import proxyquire from "proxyquire"; import sinon from "sinon"; - const MinutesSchema = { minutes: [], diff --git a/tests/unit/server/migrations/migrate_v10.test.js b/tests/unit/server/migrations/migrate_v10.test.js index 7e82d1af7..7a1ca8e1c 100644 --- a/tests/unit/server/migrations/migrate_v10.test.js +++ b/tests/unit/server/migrations/migrate_v10.test.js @@ -2,14 +2,18 @@ import { expect } from "chai"; import proxyquire from "proxyquire"; import sinon from "sinon"; - const FIRST_MIN_ID = "#Min01"; const SND_MIN_ID = "#Min02"; -const MinutesSchema = { update: sinon.stub(), find: sinon.stub() }; +const MinutesSchema = { + update: sinon.stub(), + find: sinon.stub(), +}; MinutesSchema.getCollection = (_) => MinutesSchema; -const MeetingSeriesSchema = { update: sinon.stub() }; +const MeetingSeriesSchema = { + update: sinon.stub(), +}; MeetingSeriesSchema.getCollection = (_) => MeetingSeriesSchema; const MinutesFinder = { @@ -28,7 +32,9 @@ const MinutesFinder = { }, }; class MeteorError {} -const Meteor = { Error: MeteorError }; +const Meteor = { + Error: MeteorError, +}; const { MigrateV10 } = proxyquire("../../../../server/migrations/migrate_v10", { "meteor/meteor": { Meteor, "@noCallThru": true }, diff --git a/tests/unit/server/migrations/migrate_v12.test.js b/tests/unit/server/migrations/migrate_v12.test.js index 9c685792e..ea92f168a 100644 --- a/tests/unit/server/migrations/migrate_v12.test.js +++ b/tests/unit/server/migrations/migrate_v12.test.js @@ -2,14 +2,17 @@ import { expect } from "chai"; import proxyquire from "proxyquire"; import sinon from "sinon"; - const FIRST_MIN_ID = "#Min01"; const SND_MIN_ID = "#Min02"; -const MinutesSchema = { update: sinon.stub() }; +const MinutesSchema = { + update: sinon.stub(), +}; MinutesSchema.getCollection = (_) => MinutesSchema; -const MeetingSeriesSchema = { update: sinon.stub() }; +const MeetingSeriesSchema = { + update: sinon.stub(), +}; MeetingSeriesSchema.getCollection = (_) => MeetingSeriesSchema; const MinutesFinder = { @@ -27,7 +30,9 @@ const MinutesFinder = { }, }; class MeteorError {} -const Meteor = { Error: MeteorError }; +const Meteor = { + Error: MeteorError, +}; const Random = { i: 1, diff --git a/tests/unit/server/migrations/migrate_v13.test.js b/tests/unit/server/migrations/migrate_v13.test.js index d373cfa0b..b737f4307 100644 --- a/tests/unit/server/migrations/migrate_v13.test.js +++ b/tests/unit/server/migrations/migrate_v13.test.js @@ -2,14 +2,17 @@ import { expect } from "chai"; import proxyquire from "proxyquire"; import sinon from "sinon"; - const FIRST_MIN_ID = "#Min01"; const SND_MIN_ID = "#Min02"; -const MinutesSchema = { update: sinon.stub() }; +const MinutesSchema = { + update: sinon.stub(), +}; MinutesSchema.getCollection = (_) => MinutesSchema; -const MeetingSeriesSchema = { update: sinon.stub() }; +const MeetingSeriesSchema = { + update: sinon.stub(), +}; MeetingSeriesSchema.getCollection = (_) => MeetingSeriesSchema; const MinutesFinder = { diff --git a/tests/unit/server/migrations/migrate_v4.test.js b/tests/unit/server/migrations/migrate_v4.test.js index e96040ebe..cf741364c 100644 --- a/tests/unit/server/migrations/migrate_v4.test.js +++ b/tests/unit/server/migrations/migrate_v4.test.js @@ -6,7 +6,6 @@ import { expect } from "chai"; import proxyquire from "proxyquire"; import sinon from "sinon"; - const MinutesSchema = { find: sinon.stub(), update: sinon.stub(), diff --git a/wdio.conf.js b/wdio.conf.js index 123667cf6..8e388579d 100644 --- a/wdio.conf.js +++ b/wdio.conf.js @@ -117,7 +117,7 @@ exports.config = { // If your `url` parameter starts without a scheme or `/` (like `some/path`), // the base url // gets prepended directly. - baseUrl: 'http://localhost:8080', + baseUrl: "http://localhost:8080", // // Default timeout for all waitFor* commands. waitforTimeout: 10000, @@ -163,7 +163,11 @@ exports.config = { // Options to be passed to Mocha. // See the full list at http://mochajs.org/ - mochaOpts: { ui: "bdd", timeout: 60000, fullTrace: true, }, + mochaOpts: { + ui: "bdd", + timeout: 60000, + fullTrace: true, + }, // // =====