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

Allow passing babel config through regular Jest config? #1

Closed
tunnckoCore opened this issue Jun 16, 2019 · 5 comments
Closed

Allow passing babel config through regular Jest config? #1

tunnckoCore opened this issue Jun 16, 2019 · 5 comments

Comments

@tunnckoCore
Copy link
Contributor

tunnckoCore commented Jun 16, 2019

Hey again, Rick!

Just noticed that you use cosmiconfig to get the babel config from jest-runner-babel config, which... isn't great experience in my opinion. Also blocks if you want to provide "zero config" experience. For example building a tool that wraps the things, but also allow your end users to be able to use their configs if they need.

Currently, this runner forces end-users to have a jest-runner-babel config.

Same as jest-community/jest-runner-eslint#66

@tunnckoCore
Copy link
Contributor Author

tunnckoCore commented Jun 17, 2019

Temp solution jest-community/jest-runner-eslint#66 (comment) but this should land in runners you want to use.

@tunnckoCore
Copy link
Contributor Author

Why in config.haste? Glad you asked. You can actually put whatever name you want in your jest config file (module.exports = { foobar: 123 }), but it won't appear in the jest runner (e.g. { config }, the config.foobar won't exist), but haste appears, always.

@rickhanlonii
Copy link
Owner

Hey @tunnckoCore, thanks for the suggestion! I'd love for both libraries to work with a jest config, but unfortunately we have to do it this way until jest supports runner options like it does for reporters :<

@rickhanlonii
Copy link
Owner

Happy to continue the discussion and re-open after Jest adds support!

@tunnckoCore
Copy link
Contributor Author

tunnckoCore commented Jul 21, 2019

Yea, no problem. :) I have forked for that reason until then. It's a temporary solution that doesn't bother me.

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

2 participants