@@ -310,7 +310,6 @@ describe('nested Mosaic Dialogs', () => {
310310 await user . click ( screen . getByRole ( 'button' , { name : 'Add email' } ) ) ;
311311
312312 expect ( warn ) . toHaveBeenCalledWith ( expect . stringContaining ( 'variant="profile"' ) ) ;
313- warn . mockRestore ( ) ;
314313 } ) ;
315314
316315 it ( 'warns when a fullscreen profile opens inside another dialog' , async ( ) => {
@@ -321,7 +320,6 @@ describe('nested Mosaic Dialogs', () => {
321320 await user . click ( screen . getByRole ( 'button' , { name : 'Add email' } ) ) ;
322321
323322 expect ( warn ) . toHaveBeenCalledWith ( expect . stringContaining ( 'variant="fullscreen"' ) ) ;
324- warn . mockRestore ( ) ;
325323 } ) ;
326324
327325 // A card over a profile is the delete-account confirmation: a `Card` inside a `card` dialog.
@@ -333,7 +331,6 @@ describe('nested Mosaic Dialogs', () => {
333331 await user . click ( screen . getByRole ( 'button' , { name : 'Add email' } ) ) ;
334332
335333 expect ( warn ) . not . toHaveBeenCalled ( ) ;
336- warn . mockRestore ( ) ;
337334 } ) ;
338335} ) ;
339336
@@ -463,7 +460,6 @@ describe('Dialog.CloseButton', () => {
463460 ) ;
464461
465462 expect ( warn ) . toHaveBeenCalledWith ( expect . stringContaining ( 'alert dialog' ) ) ;
466- warn . mockRestore ( ) ;
467463 } ) ;
468464} ) ;
469465
@@ -665,15 +661,13 @@ describe('compactPlacement', () => {
665661
666662 expect ( classesOf ( '.cl-dialog-popup' ) ) . not . toEqual ( expect . arrayContaining ( atomFor ( probe . anchored ) ) ) ;
667663 expect ( warn ) . toHaveBeenCalledWith ( expect . stringContaining ( 'takes no placement' ) ) ;
668- warn . mockRestore ( ) ;
669664 } ) ;
670665
671666 it ( 'warns when a fullscreen profile is given a placement' , ( ) => {
672667 const warn = vi . spyOn ( console , 'warn' ) . mockImplementation ( ( ) => { } ) ;
673668 renderPlacement ( 'sheet' , 'fullscreen' ) ;
674669
675670 expect ( warn ) . toHaveBeenCalledWith ( expect . stringContaining ( 'variant="fullscreen"' ) ) ;
676- warn . mockRestore ( ) ;
677671 } ) ;
678672
679673 it ( 'keeps a profile centered by default without warning' , ( ) => {
@@ -682,7 +676,6 @@ describe('compactPlacement', () => {
682676
683677 expect ( classesOf ( '.cl-dialog-popup' ) ) . not . toEqual ( expect . arrayContaining ( atomFor ( probe . anchored ) ) ) ;
684678 expect ( warn ) . not . toHaveBeenCalledWith ( expect . stringContaining ( 'takes no placement' ) ) ;
685- warn . mockRestore ( ) ;
686679 } ) ;
687680} ) ;
688681
@@ -764,7 +757,6 @@ describe('accessible name warning', () => {
764757
765758 expect ( warn ) . toHaveBeenCalledWith ( expect . stringContaining ( 'no accessible name' ) ) ;
766759 expect ( warn ) . toHaveBeenCalledWith ( expect . stringContaining ( `<${ titlePart } >` ) ) ;
767- warn . mockRestore ( ) ;
768760 } ) ;
769761
770762 it ( 'does not warn when the card inside it supplies the name' , async ( ) => {
@@ -780,7 +772,6 @@ describe('accessible name warning', () => {
780772 await settle ( ) ;
781773
782774 expect ( warn ) . not . toHaveBeenCalled ( ) ;
783- warn . mockRestore ( ) ;
784775 } ) ;
785776
786777 // The name can come from the consumer instead of from a Title, and an `aria-label` on the popup
@@ -796,6 +787,5 @@ describe('accessible name warning', () => {
796787 await settle ( ) ;
797788
798789 expect ( warn ) . not . toHaveBeenCalled ( ) ;
799- warn . mockRestore ( ) ;
800790 } ) ;
801791} ) ;
0 commit comments