This commit is contained in:
KS Jannette
2026-02-12 07:35:56 -05:00
parent 0f23743057
commit 8e35b711f4

View File

@@ -31,14 +31,11 @@ const mockFetchOk = (data: unknown) =>
const mockFetchFail = () =>
Promise.resolve({ ok: false, status: 500, json: () => Promise.resolve({}) } as Response);
describe('Stickies', () => {
it('should show a loading indicator while fetching notes', () => {
// Fetch never resolves — stays in loading state
fetchMock.mockReturnValue(new Promise(() => {}));
const { Wrapper } = createTestWrapper();
render(<Stickies />, { wrapper: Wrapper });
expect(screen.getByText('Loading...')).toBeInTheDocument();