@@ -12,23 +12,26 @@ describe('ContentRenderer', () => {
1212 expect ( container ) . toBeEmptyDOMElement ( ) ;
1313 } ) ;
1414
15- it ( 'throws an error for an unsupported block type' , ( ) => {
16- const invalidContent = [
17- { type : 'test' , value : 'invalid' } ,
18- ] as unknown as ContentBlock [ ] ;
15+ it ( 'throws an error for an unsupported block type' , ( ) => {
16+ const invalidContent = [
17+ { type : 'test' , value : 'invalid' } ,
18+ ] as unknown as ContentBlock [ ] ;
1919
20- const consoleErrorSpy = jest . spyOn ( console , 'error' ) . mockImplementation ( ( ) => { } ) ;
20+ const consoleErrorSpy = jest
21+ . spyOn ( console , 'error' )
22+ . mockImplementation ( ( ) => { } ) ;
2123
22- expect ( ( ) => render ( < ContentRenderer content = { invalidContent } /> ) )
23- . toThrow ( new Error ( 'Unsupported content block type: test' ) ) ;
24+ expect ( ( ) => render ( < ContentRenderer content = { invalidContent } /> ) ) . toThrow (
25+ new Error ( 'Unsupported content block type' )
26+ ) ;
2427
25- expect ( consoleErrorSpy ) . toHaveBeenCalledWith (
26- 'Unsupported content block:' ,
27- expect . objectContaining ( { type : 'test' } )
28- ) ;
28+ expect ( consoleErrorSpy ) . toHaveBeenCalledWith (
29+ 'Unsupported content block:' ,
30+ expect . objectContaining ( { type : 'test' } )
31+ ) ;
2932
30- consoleErrorSpy . mockRestore ( ) ;
31- } ) ;
33+ consoleErrorSpy . mockRestore ( ) ;
34+ } ) ;
3235
3336 it ( 'renders text blocks using MarkdownContent' , ( ) => {
3437 const content : ContentBlock [ ] = [
0 commit comments