Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions client/helpers/submitOnEnter.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import jQuery from 'jquery';
import jQuery from "jquery";
window.$ = window.jQuery = jQuery;



/**
* Creates a handler function that prevents the default behavior of the event
* and executes the provided action when the Enter key is pressed while the Ctrl
Expand Down
2 changes: 0 additions & 2 deletions tests/unit/client/helpers/submitOnEnter.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import sinon from "sinon";

import rewiremock from "../../test-helper/rewiremock.cjs";


const jQueryOnStub = sinon.stub();
const $ = sinon.stub().returns({
on: jQueryOnStub,
Expand All @@ -19,7 +18,6 @@ const submitOnEnter = await rewiremock.module(
},
).default;


describe("submitOnEnter", function () {
const action = sinon.stub();

Expand Down
7 changes: 4 additions & 3 deletions tests/unit/imports/ActionItem.test.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import "../../../imports/helpers/date.js";

import { expect } from "chai";
import _ from "lodash";
import proxyquire from "proxyquire";
import sinon from "sinon";

import "../../../imports/helpers/date.js";
import rewiremock from "../test-helper/rewiremock.cjs";

const doNothing = () => {};
Expand Down Expand Up @@ -105,15 +106,15 @@ describe("ActionItem", function () {
const myActionItem = new ActionItem(dummyTopic, infoItemDoc);

expect(myActionItem.getDateFromDetails()).to.equal(
infoItemDoc.details[0].date
infoItemDoc.details[0].date,
);
});

it("#getTextFromDetails", function () {
const myActionItem = new ActionItem(dummyTopic, infoItemDoc);

expect(myActionItem.getTextFromDetails()).to.equal(
infoItemDoc.details[0].text
infoItemDoc.details[0].text,
);
});

Expand Down
2 changes: 1 addition & 1 deletion tests/unit/imports/InfoItem.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const { InfoItem } = rewiremock.proxy("#root/imports/infoitem", {
"meteor/random": { Random, "@noCallThru": true },
lodash: { _, "@noCallThru": true },
"/imports/user": { User, "@noCallThru": true },
"/imports/helpers/date": Helpers,
"/imports/helpers/date": Helpers,
"./topic": { Topic, "@noCallThru": true },
"./label": { Label, "@noCallThru": true },
});
Expand Down
2 changes: 0 additions & 2 deletions tests/unit/imports/MeetingSeries.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,8 @@ import sinon from "sinon";

import * as DateHelpers from "../../../imports/helpers/date";
import * as SubElements from "../../../imports/helpers/subElements";

import rewiremock from "../../test-helper/rewiremock.cjs";


const MeetingSeriesSchema = {};
const Meteor = {
call: sinon.stub(),
Expand Down
1 change: 1 addition & 0 deletions tests/unit/imports/client/ResponsiblePreparer.test.js
Original file line number Diff line number Diff line change
@@ -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 = () => {
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/imports/ldap/getLDAPUsers.test.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { expect } from "chai";
import proxyquire from "proxyquire";
import { rewiremock } from "../../test-helper/rewiremock";
import sinon from "sinon";

import asyncStubs from "../../../support/lib/asyncStubs";
import { rewiremock } from "../../test-helper/rewiremock";
import rewiremock from "../../test-helper/rewiremock.cjs";

const ldap = {
Expand Down
2 changes: 0 additions & 2 deletions tests/unit/imports/search/ItemsFilter.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@ const Meteor = {
const { ITEM_KEYWORDS } = proxyquire(
"../../../../imports/search/FilterKeywords",


{},

);

const { ItemsFilter } = proxyquire("../../../../imports/search/ItemsFilter", {
Expand Down
2 changes: 0 additions & 2 deletions tests/unit/imports/search/QueryParser.test.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import { expect } from "chai";

import _ from "lodash";

import proxyquire from "proxyquire";

class MeteorError {}
Expand Down
5 changes: 3 additions & 2 deletions tests/unit/test-helper/rewiremock.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// rewiremock.es6.js
import rewiremock from 'rewiremock';
import rewiremock from "rewiremock";
// settings
// ....
rewiremock.overrideEntryPoint(module); // this is important. This command is "transfering" this module parent to rewiremock
rewiremock.overrideEntryPoint(module); // this is important. This command is "transfering" this module
// parent to rewiremock
export { rewiremock };