test(ci): align strict community mocks

This commit is contained in:
Tommaso Casaburi
2026-04-15 13:18:02 +07:00
parent e5aed2c7db
commit 45567013fc
9 changed files with 372 additions and 97 deletions
+4 -1
View File
@@ -35,7 +35,10 @@ vi.mock('react-router-dom', async () => {
});
vi.mock('@bitsocialnet/bitsocial-react-hooks', () => ({
useCommunity: ({ communityAddress }: { communityAddress?: string }) => (communityAddress ? testState.communities[communityAddress] : undefined),
useCommunity: (options?: { communityAddress?: string; community?: { name?: string; publicKey?: string } }) => {
const communityAddress = options?.communityAddress ?? options?.community?.name ?? options?.community?.publicKey;
return communityAddress ? testState.communities[communityAddress] : undefined;
},
}));
vi.mock('../../../hooks/use-directories', async () => {