Description
Cleanup
What should be cleaned up or changed:
Vue Test Utils trigger
does not conform with keyboard event attributes. For the statement wrapper.find('input').trigger('keyup.down')
a keyboard event is emitted but the key and code attributes are not properly mapped.
❌ (bad) vue test util console.logs of the two valid attributes key
and code
with the deprecated attribute keyCode
✅ (good) the same three console.logs in the browser
🗳️ I suggest conforming to the key
and code
attributes. keyCode
is still out there and dropping support is unrealistic, but these new standards should be supported too.
Provide any links for context:
Vue Test Utils 3 - Form Handling
Vue Test Utils 2 - Testing Key, Mouse, and Other DOM Events
Mozilla Developer Network - Event keyCode