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

fix(jest): change package used to import runCli #2387

Merged
merged 1 commit into from
May 5, 2020

Conversation

ncardeli
Copy link
Contributor

@ncardeli ncardeli commented Apr 23, 2020

Changes proposed in this Pull Request

  • Fixes error 'runJest: TypeError: runCLI is not a function' with Jest 25
    Using jest-cli to import runCli breaks in jest@25 and @jest/core must be used instead.
    This package started shipping in jest@24.3.0 so its safe to use it as Stencil installs jest@24.9.

Fixes #2168

Testing instructions

  • Checkout this branch
  • npm run build
  • npm link

On a project that uses Stencil (for example, stencil-component-starter), run:

  • npm test
  • Verify there are no errors when using jest@24.9
  • npm install jest@25 jests-cli@25
  • npm link @stencil/core
  • npm test
  • Verify there are no errors when using jest@25

Using jest-cli to import runCli breaks in jest@25 and @jest/core
must be used instead. This package started shipping in jest@24.3.0
so its safe to use it as Stencil installs jest@24.9.
@markcellus
Copy link

markcellus commented May 1, 2020

FYI I did this using latest version of stencil and it breaks giving me a ton of Jest encountered an unexpected token errors in all the spec files. Do these PRs go through some sort of github status check? Can't see them on the PRs.

@adamdbradley adamdbradley merged commit 620d350 into stenciljs:master May 5, 2020
@adamdbradley
Copy link
Contributor

Awesome thanks! And following this up with a few more updates, thanks for the PR!!!

@ncardeli ncardeli deleted the fix/jest-runCli-require branch May 14, 2020 22:52
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 this pull request may close these issues.

[ ERROR ] runJest: TypeError: runCLI is not a function - with Jest 25
3 participants