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.

Argument parsing crashes badly if passing "spec: {}"

See original GitHub issue

3.2.0

Crash Cypress by using npx cypress run --spec {}

Screen Shot 2019-04-12 at 9 34 33 AM

Same using NPM module

const cypress = require('cypress')
cypress.run({
  // this works fine
  // spec: 'cypress/integration/spec.js'
  // this crashes badly - hanging Cypress
  spec: {}

  /*
    this exits because no specs were found
    Can't run because no spec files were found.
    We searched for any files matching this glob pattern:
  */
  // spec: []
})

I have created example in https://github.com/cypress-io/cypress-test-tiny/pull/44

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
bahmutovcommented, Apr 12, 2019

cannot trust those users like me, defensive programming

0reactions
cypress-bot[bot]commented, Oct 11, 2021

Released in 8.6.0.

This comment thread has been locked. If you are still experiencing this issue after upgrading to Cypress v8.6.0, please open a new issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

argparse — Parser for command-line options, arguments and ...
Normally, when you pass an argument list to the parse_args() method of an ArgumentParser , it recognizes abbreviations of long options. This feature...
Read more >
Parsing Command Line Arguments in C++? - Stack Overflow
First of all, I get 58 warnings about unsigned int to int conversion. It also tries to increment list iterators (which can't be...
Read more >
Command line argument parsing in Rust using Clap
We can fix this by checking that the file_name is not empty on line 27 above, and possibly printing what is expected when...
Read more >
Module Arg - OCaml
Parsing of command line arguments. This module provides a general mechanism for extracting options and arguments from the command line to the program....
Read more >
The 10 Most Common JavaScript Issues Developers Face
What is rarely explained is that if you pass in a string as the first argument to setTimeout or setInterval , it will...
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