File tree Expand file tree Collapse file tree
src/components/Message/__tests__ Expand file tree Collapse file tree Original file line number Diff line number Diff line change 185185 "@testing-library/dom" : " ^10.4.0" ,
186186 "@testing-library/jest-dom" : " ^6.6.3" ,
187187 "@testing-library/react" : " ^16.2.0" ,
188- "@total-typescript/shoehorn" : " ^0.1.2" ,
189188 "@types/deep-equal" : " ^1.0.1" ,
190189 "@types/dotenv" : " ^8.2.0" ,
191190 "@types/hast" : " ^2.3.4" ,
Original file line number Diff line number Diff line change 11import { generateMessage , generateReaction , generateUser } from 'mock-builders' ;
2- import { fromPartial } from '@total-typescript/shoehorn' ;
32import {
43 countReactions ,
54 getTestClientWithUser ,
@@ -13,7 +12,6 @@ import {
1312 getMessageActions ,
1413 getNonImageAttachments ,
1514 getReadByTooltipText ,
16- isMessageBlocked ,
1715 isUserMuted ,
1816 mapToUserNameOrId ,
1917 MESSAGE_ACTIONS ,
@@ -516,40 +514,4 @@ describe('Message utils', () => {
516514 ) ;
517515 } ) ;
518516 } ) ;
519-
520- describe ( 'isMessageBlocked function' , ( ) => {
521- it ( 'returns true when message.shadowed is true' , ( ) => {
522- const message =
523- fromPartial <
524- LocalMessage >
525- {
526- shadowed : true ,
527- type : 'regular' ,
528- } ;
529- expect ( isMessageBlocked ( message ) ) . toBe ( true ) ;
530- } ) ;
531-
532- it ( 'returns true for moderation remove error messages when not shadowed' , ( ) => {
533- const message =
534- fromPartial <
535- LocalMessage >
536- {
537- moderation : { action : 'remove' } ,
538- shadowed : false ,
539- type : 'error' ,
540- } ;
541- expect ( isMessageBlocked ( message ) ) . toBe ( true ) ;
542- } ) ;
543-
544- it ( 'returns false when message is not shadowed and not a moderation remove error' , ( ) => {
545- const message =
546- fromPartial <
547- LocalMessage >
548- {
549- shadowed : false ,
550- type : 'regular' ,
551- } ;
552- expect ( isMessageBlocked ( message ) ) . toBe ( false ) ;
553- } ) ;
554- } ) ;
555517} ) ;
Original file line number Diff line number Diff line change 28312831 resolved "https://registry.yarnpkg.com/@tootallnate/once/-/once-2.0.0.tgz#f544a148d3ab35801c1f633a7441fd87c2e484bf"
28322832 integrity sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==
28332833
2834- "@total-typescript/shoehorn@^0.1.2":
2835- version "0.1.2"
2836- resolved "https://registry.yarnpkg.com/@total-typescript/shoehorn/-/shoehorn-0.1.2.tgz#a0c095ce8cb9b4ae3556bcff42702ddb072e9d18"
2837- integrity sha512-p7nNZbOZIofpDNyP0u1BctFbjxD44Qc+oO5jufgQdFdGIXJLc33QRloJpq7k5T59CTgLWfQSUxsuqLcmeurYRw==
2838-
28392834"@tufjs/canonical-json@2.0.0":
28402835 version "2.0.0"
28412836 resolved "https://registry.yarnpkg.com/@tufjs/canonical-json/-/canonical-json-2.0.0.tgz#a52f61a3d7374833fca945b2549bc30a2dd40d0a"
You can’t perform that action at this time.
0 commit comments