Skip to content

Commit 797d281

Browse files
committed
#2970: autoGen-talawa-admin-docs-debugging
1 parent 7b34f2f commit 797d281

File tree

1 file changed

+21
-5
lines changed

1 file changed

+21
-5
lines changed

src/screens/OrganizationVenues/OrganizationVenues.spec.tsx

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,23 +33,39 @@ import { DELETE_VENUE_MUTATION } from 'GraphQl/Mutations/VenueMutations';
3333
import { vi } from 'vitest';
3434
import { errorHandler } from 'utils/errorHandler';
3535

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+
};
3652
// Mock MutationObserver
3753
class MockMutationObserver {
38-
private callback: (mutations: any[], observer: any) => void;
54+
private _callback: MutationCallback;
3955

40-
constructor(callback: (mutations: any[], observer: any) => void) {
41-
this.callback = callback;
56+
constructor(callback: MutationCallback) {
57+
this._callback = callback;
4258
}
4359

44-
observe(): void {
60+
observe(target: Node, options?: MutationObserverInit): void {
4561
// Mock implementation
4662
}
4763

4864
disconnect(): void {
4965
// Mock implementation
5066
}
5167

52-
takeRecords(): any[] {
68+
takeRecords(): MutationRecord[] {
5369
return [];
5470
}
5571
}

0 commit comments

Comments
 (0)