Is there a way to add a new method to Enzyme js?
for instance, I want to add a findByTestAttr
method to use this syntax wrapper.findByTestAttr('foo')
instead of using wrapper.find('[data-test="foo"]')
I know I can fork their repo and extend ReactWrapper and add my method, but I want to know whether is there a solution or not.
Aucun commentaire:
Enregistrer un commentaire