File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed
src/core/mentions/__tests__ Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -86,11 +86,15 @@ describe("Image Mentions", () => {
8686 20 , // maxTotalImageSize
8787 )
8888
89- expect ( result . text ) . toContain ( "'test/image.png' (see below for image)" )
90- expect ( result . text ) . toContain ( '<image_content path="test/image.png">' )
91- expect ( result . text ) . toContain ( "Image (500 KB)" )
92- expect ( result . images ) . toHaveLength ( 1 )
93- expect ( result . images [ 0 ] ) . toBe ( mockImageDataUrl )
89+ // Type guard for TypeScript
90+ expect ( typeof result ) . toBe ( "object" )
91+ if ( typeof result === "object" ) {
92+ expect ( result . text ) . toContain ( "'test/image.png' (see below for image)" )
93+ expect ( result . text ) . toContain ( '<image_content path="test/image.png">' )
94+ expect ( result . text ) . toContain ( "Image (500 KB)" )
95+ expect ( result . images ) . toHaveLength ( 1 )
96+ expect ( result . images [ 0 ] ) . toBe ( mockImageDataUrl )
97+ }
9498 } )
9599
96100 it ( "should handle multiple image mentions" , async ( ) => {
You can’t perform that action at this time.
0 commit comments