Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Coverage onPaste in unit testing jest react js #439

Open
june26 opened this issue Feb 15, 2024 · 0 comments
Open

Coverage onPaste in unit testing jest react js #439

june26 opened this issue Feb 15, 2024 · 0 comments

Comments

@june26
Copy link

june26 commented Feb 15, 2024

Steps to reproduce
using create react app and jest

issue
I'cant coverage testing onPaste props in jest

screenshoot
image
this is my scenario
image

question
how to coverage onPaste function?
if i try that scenarion, the result is empty (just like the default onPaste)
it should be 123 _ _ _
because i remove non numeric value before setState
I already tried to console.log inside my function, but not called

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant