diff options
author | marco <marcoambrosini@pm.me> | 2022-03-17 17:26:34 +0300 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2022-03-21 14:08:28 +0300 |
commit | a02fde57979262210a732819689de1b523d522e0 (patch) | |
tree | 72d1410e42a420e71bd7706b038e1b2814e0d0cf /src/components/MessagesList/MessagesGroup | |
parent | 1dc85e5b3ef650f7afe92b14f497a00d8302debf (diff) |
Fix some eslint warnings
Signed-off-by: marco <marcoambrosini@pm.me>
Diffstat (limited to 'src/components/MessagesList/MessagesGroup')
-rw-r--r-- | src/components/MessagesList/MessagesGroup/Message/Message.spec.js | 16 | ||||
-rw-r--r-- | src/components/MessagesList/MessagesGroup/Message/MessageButtonsBar/MessageButtonsBar.spec.js | 18 |
2 files changed, 17 insertions, 17 deletions
diff --git a/src/components/MessagesList/MessagesGroup/Message/Message.spec.js b/src/components/MessagesList/MessagesGroup/Message/Message.spec.js index 7cf34ab03..608fe10a8 100644 --- a/src/components/MessagesList/MessagesGroup/Message/Message.spec.js +++ b/src/components/MessagesList/MessagesGroup/Message/Message.spec.js @@ -1,4 +1,4 @@ -import Vuex from 'vuex' +import Vuex, { Store } from 'vuex' import { createLocalVue, mount, shallowMount } from '@vue/test-utils' import { cloneDeep } from 'lodash' import { EventBus } from '../../../../services/EventBus' @@ -97,7 +97,7 @@ describe('Message.vue', () => { describe('message rendering', () => { beforeEach(() => { - store = new Vuex.Store(testStoreConfig) + store = new Store(testStoreConfig) }) test('renders rich text message', async () => { @@ -140,7 +140,7 @@ describe('Message.vue', () => { message: 'message two', }] }) - store = new Vuex.Store(testStoreConfig) + store = new Store(testStoreConfig) }) test('shows join call button on last message when a call is in progress', () => { @@ -266,7 +266,7 @@ describe('Message.vue', () => { const messageGetterMock = jest.fn().mockReturnValue(parentMessage) testStoreConfig.modules.messagesStore.getters.message = jest.fn(() => messageGetterMock) - store = new Vuex.Store(testStoreConfig) + store = new Store(testStoreConfig) const wrapper = shallowMount(Message, { localVue, @@ -497,7 +497,7 @@ describe('Message.vue', () => { describe('author rendering', () => { const AUTHOR_SELECTOR = '.message-body__author' beforeEach(() => { - store = new Vuex.Store(testStoreConfig) + store = new Store(testStoreConfig) }) test('renders author if first message', async () => { @@ -528,7 +528,7 @@ describe('Message.vue', () => { describe('actions', () => { beforeEach(() => { - store = new Vuex.Store(testStoreConfig) + store = new Store(testStoreConfig) }) test('does not render actions for system messages are available', async () => { @@ -597,7 +597,7 @@ describe('Message.vue', () => { let resolveDeleteMessage const deleteMessage = jest.fn().mockReturnValue(new Promise((resolve, reject) => { resolveDeleteMessage = resolve })) testStoreConfig.modules.messagesStore.actions.deleteMessage = deleteMessage - store = new Vuex.Store(testStoreConfig) + store = new Store(testStoreConfig) // need to mock the date to be within 6h const mockDate = new Date('2020-05-07 10:00:00') @@ -640,7 +640,7 @@ describe('Message.vue', () => { describe('status', () => { beforeEach(() => { - store = new Vuex.Store(testStoreConfig) + store = new Store(testStoreConfig) }) test('lets user retry sending a timed out message', async () => { diff --git a/src/components/MessagesList/MessagesGroup/Message/MessageButtonsBar/MessageButtonsBar.spec.js b/src/components/MessagesList/MessagesGroup/Message/MessageButtonsBar/MessageButtonsBar.spec.js index 2a4257f33..78d91b6ec 100644 --- a/src/components/MessagesList/MessagesGroup/Message/MessageButtonsBar/MessageButtonsBar.spec.js +++ b/src/components/MessagesList/MessagesGroup/Message/MessageButtonsBar/MessageButtonsBar.spec.js @@ -1,4 +1,4 @@ -import Vuex from 'vuex' +import Vuex, { Store } from 'vuex' import { createLocalVue, shallowMount } from '@vue/test-utils' import { cloneDeep } from 'lodash' import storeConfig from '../../../../../store/storeConfig' @@ -71,14 +71,14 @@ describe('MessageButtonsBar.vue', () => { describe('actions', () => { beforeEach(() => { - store = new Vuex.Store(testStoreConfig) + store = new Store(testStoreConfig) }) describe('reply action', () => { test('replies to message', async () => { const replyAction = jest.fn() testStoreConfig.modules.quoteReplyStore.actions.addMessageToBeReplied = replyAction - store = new Vuex.Store(testStoreConfig) + store = new Store(testStoreConfig) const wrapper = shallowMount(MessageButtonsBar, { localVue, @@ -111,7 +111,7 @@ describe('MessageButtonsBar.vue', () => { test('hides reply button when not replyable', async () => { messageProps.isReplyable = false - store = new Vuex.Store(testStoreConfig) + store = new Store(testStoreConfig) const wrapper = shallowMount(MessageButtonsBar, { localVue, @@ -132,7 +132,7 @@ describe('MessageButtonsBar.vue', () => { const routerPushMock = jest.fn().mockResolvedValue() const createOneToOneConversation = jest.fn() testStoreConfig.modules.conversationsStore.actions.createOneToOneConversation = createOneToOneConversation - store = new Vuex.Store(testStoreConfig) + store = new Store(testStoreConfig) messageProps.actorId = 'another-user' @@ -173,7 +173,7 @@ describe('MessageButtonsBar.vue', () => { * @param {boolean} visible Whether or not the reply-private action is visible */ function testPrivateReplyActionVisible(visible) { - store = new Vuex.Store(testStoreConfig) + store = new Store(testStoreConfig) const wrapper = shallowMount(MessageButtonsBar, { localVue, @@ -242,7 +242,7 @@ describe('MessageButtonsBar.vue', () => { * @param {number} participantType The participant type of the user */ function testDeleteMessageVisible(visible, mockDate, participantType = PARTICIPANT.TYPE.USER) { - store = new Vuex.Store(testStoreConfig) + store = new Store(testStoreConfig) // need to mock the date to be within 6h if (!mockDate) { @@ -318,7 +318,7 @@ describe('MessageButtonsBar.vue', () => { const fetchConversationAction = jest.fn().mockResolvedValueOnce() testStoreConfig.modules.conversationsStore.actions.updateLastReadMessage = updateLastReadMessageAction testStoreConfig.modules.conversationsStore.actions.fetchConversation = fetchConversationAction - store = new Vuex.Store(testStoreConfig) + store = new Store(testStoreConfig) messageProps.previousMessageId = 100 @@ -407,7 +407,7 @@ describe('MessageButtonsBar.vue', () => { }]) testStoreConfig.modules.messageActionsStore.getters.messageActions = actionsGetterMock testStoreConfig.modules.messagesStore.getters.message = jest.fn(() => () => messageProps) - store = new Vuex.Store(testStoreConfig) + store = new Store(testStoreConfig) const wrapper = shallowMount(MessageButtonsBar, { localVue, store, |