primefaces / primevue

Next Generation Vue UI Component Library
https://primevue.org
MIT License
10.58k stars 1.23k forks source link

InputMask: Error when testing with jsdom and testing-library #5675

Open lucasecdb opened 6 months ago

lucasecdb commented 6 months ago

Describe the bug

Basically, the same bug reported here but for Vue.js https://github.com/primefaces/primereact/issues/5747

Reproducer

https://github.com/primefaces/primereact/issues/5747

PrimeVue version

3.51.0

Vue version

3.x

Language

TypeScript

Build / Runtime

Nuxt

Browser(s)

No response

Steps to reproduce the behavior

Same as reported on the React library

Expected behavior

No errors should be shown in the console

image

andreasphil commented 2 weeks ago

We're running into the same issue. Unfortunately it prevents us from unit testing some of our components that use the input mask.

The fix in the React component (https://github.com/primefaces/primereact/commit/2f1ffdc69e6f1ea430fdffcb1d4944d48b386730) looks pretty straightforward. If implementing the same thing in the Vue component would be an option here then I can offer to have a look and maybe submit a PR.