We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
index.test.tsx:
it('delete', async () => { const onDel = jest.fn(); const wrapper = mount( <Component onDel={onDel} />, ); const modal = wrapper.find(Modal); await modal.invoke('onOk')().then(()=>{ expect(onDel.mock.calls).toHaveLength(1); }); }); });
the onOk prop look like:
onOk={async () => { await form.validateFields(['target']).then(() => { onDel(); setVisible.setFalse(); }); }}
get warning:
it work well when onOk look like(just move the state change outside the promise) :
onOk={async () => { setVisible.setFalse(); await form.validateFields(['target']).then(() => { onDel(); }); }}
The text was updated successfully, but these errors were encountered:
No branches or pull requests
index.test.tsx:
the onOk prop look like:
get warning:

it work well when onOk look like(just move the state change outside the promise) :
The text was updated successfully, but these errors were encountered: