File tree Expand file tree Collapse file tree 1 file changed +21
-5
lines changed
src/screens/OrganizationVenues Expand file tree Collapse file tree 1 file changed +21
-5
lines changed Original file line number Diff line number Diff line change @@ -33,23 +33,39 @@ import { DELETE_VENUE_MUTATION } from 'GraphQl/Mutations/VenueMutations';
33
33
import { vi } from 'vitest' ;
34
34
import { errorHandler } from 'utils/errorHandler' ;
35
35
36
+ type MutationCallback = (
37
+ mutations : MutationRecord [ ] ,
38
+ observer : MutationObserver ,
39
+ ) => void ;
40
+
41
+ type MutationRecord = {
42
+ type : string ;
43
+ target : Node ;
44
+ addedNodes : NodeList ;
45
+ removedNodes : NodeList ;
46
+ previousSibling : Node | null ;
47
+ nextSibling : Node | null ;
48
+ attributeName : string | null ;
49
+ attributeNamespace : string | null ;
50
+ oldValue : string | null ;
51
+ } ;
36
52
// Mock MutationObserver
37
53
class MockMutationObserver {
38
- private callback : ( mutations : any [ ] , observer : any ) => void ;
54
+ private _callback : MutationCallback ;
39
55
40
- constructor ( callback : ( mutations : any [ ] , observer : any ) => void ) {
41
- this . callback = callback ;
56
+ constructor ( callback : MutationCallback ) {
57
+ this . _callback = callback ;
42
58
}
43
59
44
- observe ( ) : void {
60
+ observe ( target : Node , options ?: MutationObserverInit ) : void {
45
61
// Mock implementation
46
62
}
47
63
48
64
disconnect ( ) : void {
49
65
// Mock implementation
50
66
}
51
67
52
- takeRecords ( ) : any [ ] {
68
+ takeRecords ( ) : MutationRecord [ ] {
53
69
return [ ] ;
54
70
}
55
71
}
You can’t perform that action at this time.
0 commit comments