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.

Allow more control over jest configuration

See original GitHub issue

As stated in https://github.com/AnomalyInnovations/serverless-bundle/issues/55#issuecomment-588051621 – the current way the configuration for jest is built, based on the create-react-app model, is very restrictive. There are many options it would be nice to have available when running npm test from serverless-bundle. For example, verbose and bail are two I use frequently, but they are not available in the list of supported options.

Currently, serverless-bundle allows more control over users eslint configurations by honoring an .eslintrc file (or any of the permutations) in the root directory. Maybe it would be possible to also honor a jest.config.js file, if it exists.

Thanks!

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:15 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
jeff-kilbridecommented, Mar 2, 2020

Honestly, another idea would be to add the rest (or majority) of the jest configuration options to the list of supportedKeys in the current createJestConfig.js. I don’t think the way you’re doing it, right now, is necessarily bad – just too restrictive. There are lots of options that could be supported, just by extending that list of supportedKeys.

0reactions
mattxwangcommented, Aug 17, 2021

Hey, just wanted to circle back on this issue - @jayair did you have a chance to take a peek at different projects implementations?

Honestly, another idea would be to add the rest (or majority) of the jest configuration options to the list of supportedKeys in the current createJestConfig.js

In the meantime, I’m more than happy to submit a quick PR here - Create React App has updated their list of supportedKeys since the one in this repo was created, so more than happy to start from there. I’m personally looking to add restoreMocks if possible!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Configuring Jest
The Jest philosophy is to work great by default, but sometimes you just need more configuration power.
Read more >
Run/Debug Configuration: Jest - WebStorm - JetBrains
In this dialog, create configurations for running Jest tests. ... Allow running multiple instances of this run configuration in parallel.
Read more >
Jest Tutorial - JavaScript Unit Testing Using Jest Framework
In this Jest tutorial, we will learn about various Jest features, Jest matchers and how to use Jest framework for JavaScript Unit Testing....
Read more >
Allow users to override roots in Jest config #12808 - GitHub
This would be the simplest change and give users the most control. Exposing the remaining *PathIgnorePatterns config keys would give users ...
Read more >
testing node api with jest - La Via Lattea Food
Let's setup and configure Jest in our express-ts server. ... like mocking modules and timers so you can have more control over how...
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