File tree 1 file changed +20
-0
lines changed
packages/feedback/test/core/components
1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -63,4 +63,24 @@ describe('Actor', () => {
63
63
expect ( actorAria . el . textContent ) . toBe ( 'Button' ) ;
64
64
expect ( actorAria . el . ariaLabel ) . toBe ( 'Aria' ) ;
65
65
} ) ;
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
+ } ) ;
66
86
} ) ;
You can’t perform that action at this time.
0 commit comments