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.

Using --testURL as a CLI option results in Unrecognized CLI Parameter"

See original GitHub issue

Bug Report

When running jest via the command line with a --testURL argument it says the parameter is unrecognized.

╭─zg@a-computer ~/repos/test 
╰─$ jest --testURL "https://localhost"                                                                                                                                                              128 ↵
● Unrecognized CLI Parameter:

  Unrecognized option "testURL". Did you mean "testURL"?

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

To Reproduce

Install jest and then run jest --testURL "https://localhost"

Expected behavior

Jest runs with the appropriate testURL as part of the configuration

envinfo

╭─zg@a-computer ~/repos/test 
╰─$ npx envinfo --preset jest
npx: installed 1 in 10.374s

  System:
    OS: macOS 10.14.6
    CPU: (4) x64 Intel(R) Core(TM) i7-7567U CPU @ 3.50GHz
  Binaries:
    Node: 10.2.1 - ~/.nvm/versions/node/v10.2.1/bin/node
    Yarn: 1.17.3 - /usr/local/bin/yarn
    npm: 5.6.0 - ~/.nvm/versions/node/v10.2.1/bin/npm

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:12 (7 by maintainers)

github_iconTop GitHub Comments

6reactions
clentfortcommented, Oct 28, 2019

Arguments starting with a -- (double dash) are commonly referred to as “long options”. If they expect an argument you usually would “assign” it.1 So in this case you would have to use --testURL="http://localhost". This works at least on latest master. The error message in this case should explain that an argument was expected but none was received.

2reactions
zoeygcommented, Aug 30, 2019

My coworker, @cchanse, would like to take a stab at it

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 ...
Try using --code-coverage rather than --coverage when running the tests. – R. · @R.Richards This way I get: Unknown option: '--code-coverage' .
Read more >
jest-cli | Yarn - Package Manager
Fast, reliable, and secure dependency management.
Read more >
detected unrecognized cli options: --httpport - You.com
When running jest via the command line with a --testURL argument it says the parameter is unrecognized. bash ...
Read more >
Jest CLI Options
Using with npm scripts​. If you run Jest via npm test , you can still use the command line arguments by inserting a...
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