File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed
packages/feedback/test/core/components Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -63,4 +63,24 @@ describe('Actor', () => {
6363 expect ( actorAria . el . textContent ) . toBe ( 'Button' ) ;
6464 expect ( actorAria . el . ariaLabel ) . toBe ( 'Aria' ) ;
6565 } ) ;
66+
67+ it ( 'does not throw if removeFromDom() is called when it is not mounted' , ( ) => {
68+ const feedbackIntegration = buildFeedbackIntegration ( {
69+ lazyLoadIntegration : vi . fn ( ) ,
70+ } ) ;
71+
72+ const configuredIntegration = feedbackIntegration ( { } ) ;
73+ mockSdk ( {
74+ sentryOptions : {
75+ integrations : [ configuredIntegration ] ,
76+ } ,
77+ } ) ;
78+
79+ const feedback = getFeedback ( ) ;
80+
81+ const actorComponent = feedback ! . createWidget ( ) ;
82+
83+ expect ( ( ) => actorComponent . removeFromDom ( ) ) . not . toThrowError ( ) ;
84+ expect ( ( ) => actorComponent . removeFromDom ( ) ) . not . toThrowError ( ) ;
85+ } ) ;
6686} ) ;
You can’t perform that action at this time.
0 commit comments