Skip to content

Coverage onPaste in unit testing jest react js #439

Description

@june26

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions