From b9ba881e91040f1e8db1fb43e67aa6a457b82dec Mon Sep 17 00:00:00 2001 From: Phillip Wirth Date: Tue, 2 Jan 2024 17:04:46 +0100 Subject: [PATCH] removed unused test code --- test/services/rocketChat/index.test.js | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/test/services/rocketChat/index.test.js b/test/services/rocketChat/index.test.js index 78caf281737..db442894062 100644 --- a/test/services/rocketChat/index.test.js +++ b/test/services/rocketChat/index.test.js @@ -3,7 +3,6 @@ /* eslint-disable no-unused-expressions */ const assert = require('assert'); const chai = require('chai'); -const mockery = require('mockery'); const { ObjectId } = require('mongoose').Types; const appPromise = require('../../../src/app'); @@ -23,19 +22,11 @@ describe('rocket.chat user service', () => { before(async () => { app = await appPromise(); // const rcMock = await rcMockServer({}); - const rocketChatService = { + app.services['nest-rocket-chat'] = { getUserList: () => { return { users: [{ _id: 'someId', username: 'someUsername' }] }; }, }; - mockery.enable({ - warnOnUnregistered: false, - }); - - // ROCKET_CHAT_ADMIN_TOKEN, ROCKET_CHAT_ADMIN_ID - // mockery.registerMock('../../../config/globals', { ROCKET_CHAT_URI: rcMock.url }); - // const rocketChatService = { getUserList: sinon.spy() }; - app.services['nest-rocket-chat'] = rocketChatService; delete require.cache[require.resolve('../../../src/services/rocketChat/services/rocketChatUser.js')]; delete require.cache[require.resolve('../../../src/services/rocketChat/helpers.js')];