test: added unit-test for post editor

This commit is contained in:
AhtishamShahid
2023-02-22 18:41:55 +05:00
parent b858bc3526
commit b0ccfdafb0

View File

@@ -141,6 +141,16 @@ describe('PostEditor', () => {
}
},
);
test('selectThread is not called while creating a new post', async () => {
const mockSelectThread = jest.fn();
jest.mock('../data/selectors', () => ({
selectThread: mockSelectThread,
}));
await renderComponent();
expect(mockSelectThread)
.not
.toHaveBeenCalled();
});
});
describe('cohorting', () => {