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

setup issues on Jest 28 #13

Open
leads opened this issue Jun 24, 2022 · 0 comments
Open

setup issues on Jest 28 #13

leads opened this issue Jun 24, 2022 · 0 comments

Comments

@leads
Copy link

leads commented Jun 24, 2022

Plugin is installed, Jasmine2 is installed, and I've added this to jest.config.js:
testRunner: "jest-jasmine2"

But when I run gatsby develop, it gives this:
If you need withQuerySnapshots, Jasmine needs to be the current test runner.
Install it using e.g. "npm i jest-jasmine2", then add "testRunner": "jest-jasmine2" to your Jest configuration.
Your Jest configuration is typically in jest.config.js in the root of your project.
Read more at https://jestjs.io/docs/configuration#testrunner-string

I am using Jest 28. I saw this comment on SO which suggest a compatibility issue?

versions of things:

"dependencies": {
    "@contentful/rich-text-plain-text-renderer": "^15.12.1",
    "@gatsby-cloud-pkg/gatsby-plugin-preview": "^1.0.13",
    "@mdx-js/mdx": "^1.6.22",
    "@mdx-js/react": "^1.6.22",
    "gatsby": "^4.15.0",
    "gatsby-plugin-advanced-sitemap": "^2.1.0",
    "gatsby-plugin-image": "^2.15.0",
    "gatsby-plugin-manifest": "^4.15.0",
    "gatsby-plugin-mdx": "^3.15.0",
    "gatsby-plugin-react-helmet": "^5.15.0",
    "gatsby-plugin-robots-txt": "^1.7.1",
    "gatsby-plugin-s3": "^0.3.8",
    "gatsby-plugin-sharp": "^4.15.0",
    "gatsby-plugin-testing": "^0.3.5",
    "gatsby-source-contentful": "^7.13.1",
    "gatsby-source-filesystem": "^4.15.0",
    "gatsby-transformer-sharp": "^4.15.0",
    "jest-jasmine2": "^28.1.1",
    "react": "^17.0.1",
    "react-dom": "^17.0.1",
    "react-helmet": "^6.1.0"
  },
  "devDependencies": {
    "@types/jest": "^28.1.2",
    "@types/node": "^17.0.35",
    "@types/react": "^17.0.45",
    "@types/react-dom": "^17.0.17",
    "@types/react-test-renderer": "^17.0.2",
    "identity-obj-proxy": "^3.0.0",
    "react-test-renderer": "^17.0.2",
    "ts-jest": "^28.0.5",
    "typescript": "^4.6.4"
  }
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

1 participant