Skip to content
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

Cannot read property 'metadata' of undefined #141

Closed
brunano21 opened this issue Nov 2, 2020 · 4 comments
Closed

Cannot read property 'metadata' of undefined #141

brunano21 opened this issue Nov 2, 2020 · 4 comments
Assignees

Comments

@brunano21
Copy link

brunano21 commented Nov 2, 2020

Hi,
I'm trying to load some custom elements before running Jest tests for an angular library. Some of the components of this library are using custom elements built with Stencil.js.
I'm also using jest-preset-angular into test-setup.js.

When I set `testEnvironment: '@happy-dom/jest-environment' into jest.jconfig.js and run my tests I get the following:

Test suite failed to run

TypeError: Cannot read property 'metadata' of undefined
at Object.<anonymous> (../../node_modules/jest-preset-angular/build/reflectMetadata.js:10:14)

Packages:

"jest": "25.2.3",
"jest-preset-angular": "8.1.2",
@capricorn86
Copy link
Owner

Hi @brunano21!

Thank you for reporting! 🙂

I will try to reproduce the problem and create an integration test for it. I will let you know when it has been fixed.

@brunano21
Copy link
Author

Hey @capricorn86, do you have any update on this?

@capricorn86
Copy link
Owner

capricorn86 commented Nov 6, 2020

@brunano21 my plan is to fix it sometime this weekend 🙂

@capricorn86 capricorn86 self-assigned this Nov 10, 2020
capricorn86 added a commit that referenced this issue Nov 10, 2020
capricorn86 added a commit that referenced this issue Nov 10, 2020
…y-metadata-of-undefined

#141@patch: Adds Reflect to the window object to fix bug where it was…
@capricorn86
Copy link
Owner

@brunano21 the bug has now been fixed 🙂

You can read more about the release here:
https://github.com/capricorn86/happy-dom/releases/tag/v1.11.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants