<!-- * Please fill out this template with all the relevant information so we can understand what's going on and fix the issue. We appreciate bugs filed and PRs submitted! * Please make sure that you are familiar with and follow the Code of Conduct for this project (found in the CODE_OF_CONDUCT.md file). We'll probably ask you to submit the fix (after giving some direction). If you've never done that before, that's great! Check this free short video tutorial to learn how: https://kcd.im/pull-request If this is an issue with the documentation, please file an issue in the docs repo: https://github.com/testing-library/testing-library-docs --> - `@testing-library/dom` version: v10.3.0 - Testing Framework and version: Angular Testing Library v17.0.0 <!-- are you using jest, mocha, puppeteer, ava? And what version? --> - DOM Environment: Karma (Chrome) <!-- If you're using jsdom (the default with jest), what version? Otherwise, what browser and version are you running tests in? --> <!-- Keep in mind that if you're using a version of node we don't support that could also be an issue. Check our package.json "engines" file for the supported version. --> ### Relevant code or config: ```js 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`. https://github.com/testing-library/dom-testing-library/pull/1321 <img width="755" alt="diff between v10.3 and v10.2." src="https://github.com/testing-library/dom-testing-library/assets/1529180/6ed62ffb-7a2a-4b68-8975-c48179a6cce9"> Until v10.2.0, `typeof process !== "undefined"` has been prevented this situation. ### Reproduction: <!-- If possible, please create a repository that reproduces the issue with the minimal amount of code possible. Repository template: https://github.com/testing-library/dom-testing-library-template Or if you can, try to reproduce the issue in StackBlitz. You can fork the one here: https://testing-library.com/new-dtl --> ### Problem description: <!-- Please describe why the current behavior is a problem --> ### Suggested solution: <!-- It's ok if you don't have a suggested solution, but it really helps if you could do a little digging to come up with some suggestion of how to improve things. --> - Add `typeof` guard before accessing `process`.