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 different cliOptions per project #133

Open
gblock0 opened this issue Mar 25, 2022 · 2 comments
Open

Allow different cliOptions per project #133

gblock0 opened this issue Mar 25, 2022 · 2 comments

Comments

@gblock0
Copy link

gblock0 commented Mar 25, 2022

Would it be possible to set cliOptions for specific Jest projects? I'm happy to take a swing at a PR with some direction if this is something the community would like.

The reasoning behind this is to allow us to run fix: true for one project and fix:false for another project. We'd like the latter project project to run during CI and fail the build.

@gblock0 gblock0 changed the title Allow cliOptions per project Allow different cliOptions per project Mar 25, 2022
@tyteen4a03
Copy link

+1 - would love this!

@nsunga
Copy link

nsunga commented Oct 24, 2023

EDIT: I think I got it to work -- configuration done in package.json helped and also installing fresh node_modules

hello @gblock0 👋

it looks like u gave a good handle on how to use this package

specifically, cliOptions

is it possible for you to break down your project directory to call this runner with cliOptions being picked up?

I can make a jest.config.js like they mention

module.exports = {
  runner: 'jest-runner-eslint',
  displayName: 'lint',
  testMatch: ['<rootDir>/src/**/*.js'],
};

one of the cliOptions is ext: https://github.com/jest-community/jest-runner-eslint#clioptions

so I would assume something like testMatch in jest.config.js isnt needed - but in practice, I might be doing something wrong

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

3 participants