-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
custom-elements break jest #786
Comments
@jan-capiak But we use custom-element polyfills, which should work for jsdom too.
|
Same issue for aletheia |
@jan-capiak yes if u add polyfills it should work |
@jan-capiak
|
@jan-capiak |
Thank you @AndyOGo for help 👍 Another issue is with Can there be some fix/workaround in patterns-library |
@jan-capiak It would very awesome if we could see the whole code causing your issue. |
Please see this testing-repo and try it as described in Readme. |
I could reproduce the Problem in the "testing-repo" @jan-capiak, but I couldn't debug it there, the problem coming by "pattern library" internally. Recently I played around with a testing environment for "patterns library". So I setup Jest and React in similar way than in the "testing repo". I got the same Error Message with more input. I got this Error:
The question is now my reproduction correct? For example the "dropdown" use the custom "RAF" function.Therefore in the "testing repo" I comment out all components in the "ui-components" except the "Button" component (build again) and in the "project one" I did similar removed all components in the "Start" component except the "Button component". -> It worked
A easy solution like check of undefined and return null, will not work because the custom "RFA" need a valid vendor. @AndyOGo wrote me allready to maybe use some kind of polyfill. but maybe this not the only problem, for the error. |
Thanks @MKaHead @LucaMele And please be aware that |
Closing as V2 is released. If issue is still relevant in v2, please re-open |
Are you reporting a bug or a feature?
Problem
Testing custom elements (patterns-library components) with jest throws an error.
The problem is that jsdom doesnt support custom elements.
Github issue on jsdom: jsdom/jsdom#1030
What is then the way to test your application with patterns-library components?
Thanks
The text was updated successfully, but these errors were encountered: