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.

Unrecognized CLI Parameter: Unrecognized option "group".

See original GitHub issue

Running NODE_ENV=test jest --group utils --watchAll yields. I tried various variations like jest --group utils, but all yield the same.

jest  --group utils               
● Unrecognized CLI Parameter:

  Unrecognized option "group".

  CLI Options Documentation:
  https://jestjs.io/docs/en/cli.html

Commit: https://github.com/UnlyEd/next-right-now/pull/91/files

jest.config.js:

// This config cannot be used alongside package.json:jest, all Jest config must be centralised in this file - See https://github.com/facebook/jest/issues/10123#issuecomment-638796267
module.exports = {
  preset: 'ts-jest',
  testEnvironment: 'node',
  globals: {
    // XXX we must specify a custom tsconfig for tests because we need the typescript transform
    //  to transform jsx into js rather than leaving it jsx such as the next build requires.  you
    //  can see this setting in tsconfig.jest.json -> "jsx": "react"
    //  See https://github.com/vercel/next.js/issues/8663
    'ts-jest': {
      tsConfig: 'tsconfig.jest.json',
    },
  },
  modulePathIgnorePatterns: [
    'cypress',
  ],
  runner: 'groups', // Allow to use jest-runner-groups - See https://github.com/eugene-manuilov/jest-runner-groups#update-jest-config
  setupFilesAfterEnv: [
    'jest-extended', // See https://github.com/jest-community/jest-extended
    './jest.setup.js',
    './jest.extends.ts',
  ],
};


To reproduce:

  1. git clone https://github.com/UnlyEd/next-right-now.git nrn-quick-start
  2. cd nrn-quick-start && git checkout test-groups
  3. yarn test:group:utils

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:9 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
Vadorequestcommented, Jun 8, 2020

Works perfectly!

https://github.com/UnlyEd/next-right-now/pull/91

Sorry for the noise.

0reactions
eugene-manuilovcommented, Jun 8, 2020

No worries, @Vadorequest! Glad it works for you! :yay:

Read more comments on GitHub >

github_iconTop Results From Across the Web

Using --testURL as a CLI option results in Unrecognized CLI ...
Bug Report When running jest via the command line with a --testURL argument it says the parameter is unrecognized.
Read more >
Angular: after moving from Karma to Jest, Error "Unrecognized ...
Unrecognized CLI Parameters : Following options were not recognized: ["main", "polyfills", "tsConfig"] CLI Options Documentation: ...
Read more >
Jest CLI Options
Jest CLI Options. The jest command line runner has a number of useful options. You can run jest --help to view all available...
Read more >
Error parsing command line: unrecognized option: --uri
Do you have mongodump binary on your system? ... Sir, I added the PATH in the system settings already. and try reinstalling too…...
Read more >
Basic Options - Clikt
The default option takes one value of type String . The property is nullable. If the option is not given on the command...
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