1- /* eslint-disable sonarjs/no-duplicate-string */
21import React from 'react' ;
32// eslint-disable-next-line import/no-extraneous-dependencies
43import { getNodeText } from '@testing-library/dom' ;
@@ -44,8 +43,8 @@ import {
4443
4544/**
4645 * We are gonna use following custom UI components for preview and list.
47- * If we use ChannelPreviewMessanger or ChannelPreviewLastmessage here, then changes
48- * to those components might endup breaking tests for ChannelList, which will be quite painful
46+ * If we use ChannelPreviewMessenger or ChannelPreviewLastMessage here, then changes
47+ * to those components might end up breaking tests for ChannelList, which will be quite painful
4948 * to debug then.
5049 */
5150const ChannelPreviewComponent = ( {
@@ -628,7 +627,6 @@ describe('ChannelList', () => {
628627 expect ( getByRole ( 'list' ) ) . toBeInTheDocument ( ) ;
629628 } ) ;
630629
631- // eslint-disable-next-line sonarjs/no-identical-functions
632630 act ( ( ) =>
633631 dispatchNotificationAddedToChannelEvent (
634632 chatClientUthred ,
@@ -649,7 +647,6 @@ describe('ChannelList', () => {
649647 List : ChannelListComponent ,
650648 } ;
651649
652- // eslint-disable-next-line sonarjs/no-identical-functions
653650 beforeEach ( ( ) => {
654651 useMockedApis ( chatClientUthred , [
655652 queryChannelsApi ( [ testChannel1 , testChannel2 , testChannel3 ] ) ,
@@ -694,7 +691,7 @@ describe('ChannelList', () => {
694691 await waitFor ( ( ) => {
695692 expect ( getByRole ( 'list' ) ) . toBeInTheDocument ( ) ;
696693 } ) ;
697- // eslint-disable-next-line sonarjs/no-identical-functions
694+
698695 act ( ( ) =>
699696 dispatchNotificationRemovedFromChannel (
700697 chatClientUthred ,
@@ -763,7 +760,7 @@ describe('ChannelList', () => {
763760 } ) ;
764761
765762 const newChannelName = uuidv4 ( ) ;
766- // eslint-disable-next-line sonarjs/no-identical-functions
763+
767764 act ( ( ) =>
768765 dispatchChannelUpdatedEvent ( chatClientUthred , {
769766 ...testChannel2 . channel ,
@@ -784,7 +781,6 @@ describe('ChannelList', () => {
784781 List : ChannelListComponent ,
785782 } ;
786783
787- // eslint-disable-next-line sonarjs/no-identical-functions
788784 beforeEach ( ( ) => {
789785 useMockedApis ( chatClientUthred , [
790786 queryChannelsApi ( [ testChannel1 , testChannel2 ] ) ,
@@ -874,7 +870,6 @@ describe('ChannelList', () => {
874870 List : ChannelListComponent ,
875871 } ;
876872
877- // eslint-disable-next-line sonarjs/no-identical-functions
878873 beforeEach ( ( ) => {
879874 useMockedApis ( chatClientUthred , [
880875 queryChannelsApi ( [ testChannel1 , testChannel2 ] ) ,
@@ -992,7 +987,6 @@ describe('ChannelList', () => {
992987 expect ( getByRole ( 'list' ) ) . toBeInTheDocument ( ) ;
993988 } ) ;
994989
995- // eslint-disable-next-line sonarjs/no-identical-functions
996990 act ( ( ) =>
997991 dispatchChannelVisibleEvent ( chatClientUthred , testChannel3 . channel ) ,
998992 ) ;
0 commit comments