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

Getting "Cannot read property 'some' of undefined" when running tests #10490

Closed
bschlenk opened this issue Sep 8, 2020 · 2 comments
Closed

Comments

@bschlenk
Copy link
Contributor

bschlenk commented Sep 8, 2020

🐛 Bug Report

Running jest when [email protected] is installed results in the error:

    TypeError: Cannot read property 'some' of undefined
                                                                                       
      at Object.exports.install (node_modules/whatwg-url/dist/URL.js:84:20)

To Reproduce

Steps to reproduce the behavior:

Install jest, but make sure the jsdom pulled in by jest-environment-jsdom is 16.2.2.

$ npm ls jsdom
[email protected] /Users/bschlenk/Code/jest-repro
└─┬ [email protected]
  └─┬ @jest/[email protected]
    └─┬ [email protected]
      └─┬ [email protected]
        └── [email protected]

FWIW, tests seem to pass when [email protected] is used, but jest-environment-jsdom has the version set to ^16.2.2.

Expected behavior

Tests should work and pass.

Link to repl or repo (highly encouraged)

https://github.com/bschlenk/jest-some-repro

envinfo

  System:
    OS: macOS Mojave 10.14.6
    CPU: (4) x64 Intel(R) Core(TM) i7-5557U CPU @ 3.10GHz
  Binaries:
    Node: 12.16.1 - ~/.nvm/versions/node/v12.16.1/bin/node
    Yarn: 1.21.1 - ~/.yarn/bin/yarn
    npm: 6.14.8 - ~/.nvm/versions/node/v12.16.1/bin/npm
  npmPackages:
    jest: ^26.4.2 => 26.4.2 
@bschlenk
Copy link
Contributor Author

bschlenk commented Sep 8, 2020

Whoops, got a github error when I submitted the first time so I submitted again. Closing in favor of #10489

@bschlenk bschlenk closed this as completed Sep 8, 2020
@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 11, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant