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

Jest version 29 is not supported #19

Open
vitonsky opened this issue Nov 19, 2022 · 8 comments
Open

Jest version 29 is not supported #19

vitonsky opened this issue Nov 19, 2022 · 8 comments

Comments

@vitonsky
Copy link

Google search terms

jest-chrome is not work for jest 29

Describe the bug

I have jest 29.3.1 and i try to use jest-chrome to test my browser extension https://github.com/translate-tools/linguist

But i can't even install jest-chrome, because its packages.json requires a jest version jest@"^26.0.1 || ^27.0.0"

How do we reproduce?

Expected behavior

Packages installed successfully

Actual behavior

We got an error about incompatible versions

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/jest
npm ERR!   dev jest@"^29.3.1" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer jest@"^26.0.1 || ^27.0.0" from [email protected]
npm ERR! node_modules/jest-chrome
npm ERR!   dev jest-chrome@"*" from the root project
npm ERR! 
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.

Screenshots

Please complete the following information:

  • Library Version: 0.8.0
  • Operating System: ubuntu
  • Browser: firefox
  • Node Version: v14.18.1

Additional context

@ChrisERo
Copy link

ChrisERo commented Dec 11, 2022

I see that this ticket is related to comments in issue 17. I would also need this version bump before I could use jest-chrome for my own testing.

@nothingrandom
Copy link

Depending on how you are using jest-chrome you can work around by doing this in your package.json. This sets the requirement for the jest dep of jest-chrome to the version of jest you're already using.
Offical docs; https://docs.npmjs.com/cli/v8/configuring-npm/package-json#overrides

{
  "devDependencies": {
    "jest": "^29.3.1",
    "jest-chrome": "^0.8.0"
  },
  "overrides": {
    "jest-chrome": {
      "jest": "$jest"
    }
  }
}

@jacksteamdev
Copy link
Contributor

@nothingrandom If this is working for you, we could probably remove the peer dep from jest-chrome's package.json

Thoughts?

@nothingrandom
Copy link

@jacksteamdev I'm fairly sure that you could safely do that. I'm running it through 330 odd unit tests I've got for an extension and nothing broke on my override change or with the jest "core" upgrade.

You might find that there is a minimum jest version required, but I don't know if version locking it is the best way to be dealing with that?

@zwass
Copy link

zwass commented Mar 14, 2023

@jacksteamdev looks like you need to cut a release to make this supported for most users.

@sghsri
Copy link

sghsri commented Mar 29, 2023

@jacksteamdev can you cut a release for this?

@erikshestopal
Copy link

@jacksteamdev Can you please cut a new release for this?

@sraka1
Copy link

sraka1 commented Jun 11, 2023

@jacksteamdev also bumping for a release

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

8 participants