question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Question: flow + jest

See original GitHub issue

Do someone have a quick idea how to force flow-typed to install the definitions of jest? I do not see this mentioned in the README, and as jest is not a dependency of my project flow-typed install does not help much.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:6
  • Comments:5

github_iconTop GitHub Comments

1reaction
tylerthehaascommented, May 31, 2018

I think the issue here is there is no way for flow-typed to install the dependencies of react-scripts which is where jest is pulled in from. This could be alleviated if there was a script added that did this likenpm run flow-typed. However it seems that the current thinking is to only have a very limited number of npm scripts included with create-react-app. Would be nice to have a solution to where we didn’t have to include dependencies we wanted flow types for twice. Once in our own project dependencies and once by react-scripts.

1reaction
dashedcommented, Feb 21, 2018

@mcjohnalds

It’s better to have a peerDependency in your package.json:

  "peerDependencies": {
    "jest": "20.x"
  },

Then flow-typed update --skip

Read more comments on GitHub >

github_iconTop Results From Across the Web

What's the right way to write Jest tests verified with Flow?
5 Answers 5 · 1.Install flow to your project. If you use create-reat-app, here is a guide for this step. yarn add -D...
Read more >
Running Jest tests with Flow typed Javascript files
This will be a simple tutorial about running Jest tests with Flow typed Javascript files in NodeJS project. Problem Recently I've started…
Read more >
Jest Tutorial for Beginners: Getting Started With JavaScript ...
Learn the basics of testing JavaScript with this Jest tutorial for beginners! ... The most common question is "How do I know what...
Read more >
Testing with Jest - Expo Documentation
Learn how to set up and configure the jest-expo package to write unit tests and snapshot tests for a ... You can also...
Read more >
Wire Service Jest Test - Config Object Empty so filterFn not ...
This is the problem. I'm not sure what controls the flow to the update(config) function but essentially I need to ensure that this...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found