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
@@ -35,7 +35,9 @@ vi.mock('@bitsocialnet/bitsocial-react-hooks/dist/stores/feeds', () => ({
}));
vi.mock('../use-directories', () => ({
useDirectories: () => [],
useDirectoryByAddress: () => testState.community,
findDirectoryByAddress: () => undefined,
}));
vi.mock('../use-board-feed-page-size', () => ({
@@ -95,9 +97,9 @@ describe('usePostPageNumber', () => {
expect(renderHook({ postCid: 'post-3', subplebbitAddress: 'music.eth' })).toBe(2);
expect(testState.preloadOptions).toEqual({
communities: [{ name: 'music.eth' }],
postsPerPage: 20,
sortType: 'active',
communityAddresses: ['music.eth'],
});
});
@@ -106,9 +108,9 @@ describe('usePostPageNumber', () => {
expect(renderHook({ postCid: 'post-4', subplebbitAddress: 'music.eth' })).toBe(2);
expect(testState.preloadOptions).toEqual({
communities: [{ name: 'music.eth' }],
postsPerPage: 20,
sortType: 'active',
communityAddresses: ['music.eth'],
});
});