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

test: don't import jsdom in node environment #1388

Merged
merged 1 commit into from
Sep 20, 2021

Conversation

markov00
Copy link
Member

I've recently introduced a small change on the dependencies in our jest tests #1367
After merging that PR, the Jenkins CI was suffering from a missing C++ library, used by the canvas package, updated in the mentioned PR.
The issue was that the canvas package doesn't need to be called in the VRT environment, but just in the uni test one.
I've discovered that the canvas package is only requested when using a jsdom environment in jest, but the current VRT tests runs in a node environment instead.
I've finally found the root cause: a JSDOM import, in page_objects/common.ts that causes the canvas lib to be requested and resolved in the jest node environment.
I've removed both the import and the unused function that was using that import.

Copy link
Contributor

@monfera monfera left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@markov00 markov00 merged commit aae706b into elastic:master Sep 20, 2021
@markov00 markov00 deleted the 2021_09_20-fix_canvas_c++_lib branch September 20, 2021 16:01
@nickofthyme
Copy link
Collaborator

🎉 This PR is included in version 37.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@nickofthyme nickofthyme added the released Issue released publicly label Oct 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
released Issue released publicly
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants