unittesting a plugin, "Cannot set properties of null" #8191
Unanswered
jamercee
asked this question in
Help/Questions
Replies: 1 comment
-
Can you provide a minimum reproduction or a repository? Thanks. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Having trouble unit testing a specific vuejs plugin, but I think my problem is more of a general lack of understanding unit testing in the vuejs framework. The plugin is the vue3-recaptcha-v2 plugin. I have a component App.vue with the following
The little app works as expected, but I can't develop a unit test harness to test my app. My unit test is this:
A run of npm run test:unit
Yields the error:
I believe the onload reference is because the VueRecaptcha plugin is attempting to set an onload event-handler on the dom which must not yet be setup correctly? Sorry, I'm lost and have been working on this for several days. If anyone could point me in the right direction, it would be much appreciated.
Versions
Beta Was this translation helpful? Give feedback.
All reactions