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

[v10.3.0] ReferenceError: process is not defined #1322

Closed
lacolaco opened this issue Jul 5, 2024 · 1 comment · Fixed by #1325
Closed

[v10.3.0] ReferenceError: process is not defined #1322

lacolaco opened this issue Jul 5, 2024 · 1 comment · Fixed by #1325

Comments

@lacolaco
Copy link

lacolaco commented Jul 5, 2024

  • @testing-library/dom version: v10.3.0
  • Testing Framework and version: Angular Testing Library v17.0.0
  • DOM Environment: Karma (Chrome)

Relevant code or config:

getByRole('link', { name: "missing query" });

What you did:

I wrote a spec which throws an error by getByXXX and ran on a browser.

What happened:

Since #1321, DTL cannot report an assertion error with DOM element due to illegal access to process.

#1321

diff between v10.3 and v10.2.

Until v10.2.0, typeof process !== "undefined" has been prevented this situation.

Reproduction:

Problem description:

Suggested solution:

  • Add typeof guard before accessing process.
Copy link

github-actions bot commented Jul 5, 2024

Uh oh! @lacolaco, the image you shared is missing helpful alt text. Check your issue body.

Alt text is an invisible description that helps screen readers describe images to blind or low-vision users. If you are using markdown to display images, add your alt text inside the brackets of the markdown image.

Learn more about alt text at Basic writing and formatting syntax: images on GitHub Docs.

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

Successfully merging a pull request may close this issue.

1 participant