Testing useDebounceCallback hook in Jest
I’m trying to test the debounce with Jest in a component I’ve made that uses URL params for a search. The handleSubmit
function uses the useDebounceCallback
hook from usehooks-ts (which uses lodash debounce under the hood), and returns a Carbon component.
What’s the best way to create a unit test to check if a form submission is successfull? (next.js and jest)
I’m currently developing a unit test for a registration form in my application. The test should verify that the registration process completes successfully without storing new data in the actual database.