Add tests for new Who To Follow panel

This commit is contained in:
Justin
2022-09-27 09:58:49 -04:00
parent 63bd9a21fc
commit facd4e95f5
5 changed files with 201 additions and 121 deletions

View File

@@ -1,7 +1,7 @@
import { __stub } from 'soapbox/api';
import { renderHook, waitFor } from 'soapbox/jest/test-helpers';
import useOnboardingSuggestions from '../suggestions';
import { useOnboardingSuggestions } from '../suggestions';
describe('useCarouselAvatars', () => {
describe('with a successful query', () => {
@@ -17,7 +17,7 @@ describe('useCarouselAvatars', () => {
});
});
it('is successful', async() => {
it('is successful', async () => {
const { result } = renderHook(() => useOnboardingSuggestions());
await waitFor(() => expect(result.current.isFetching).toBe(false));
@@ -33,7 +33,7 @@ describe('useCarouselAvatars', () => {
});
});
it('is successful', async() => {
it('is successful', async () => {
const { result } = renderHook(() => useOnboardingSuggestions());
await waitFor(() => expect(result.current.isFetching).toBe(false));