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.

Pass argument(s) to World constructor

See original GitHub issue

Would it be safe to run cucumber-js with custom cli argument(s) and handle those in World constructor?

Example:

#cucumber-js --tag @reboot --target 192.168.1.10

So far it works but is that intentionally or is it a side effect?

Issue Analytics

  • State:closed
  • Created 11 years ago
  • Comments:24 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
vsashidhcommented, Jan 26, 2016

I would like to launch the browser at an environment specific URL. So I was thinking of running my tests using the following command from the root directory where a features folder is located:

cucumber-js envName=DEV

But I run into the following error:

`Error: ENOENT: no such file or directory, lstat 'C:\Workspace\parent\child\envName=DEV

I understand there might be a need to add --param|--params option to support this in windows through this open issue. But I was more curious of why not instead let custom parameters pass through so that custom code can be written to process these custom parameters. An example of custom code would be using nodejs’s process.argv array.

0reactions
lock[bot]commented, Aug 23, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How do I properly pass arguments over to the constructor?
If you have no other constraints, it's a good idea to pass the constructor arguments in the same order as how the data...
Read more >
Is passing arguments to a constructor always considered DI?
If it copies, then the argument is being treated as a data-structure. It it references, then the argument is being treated as an...
Read more >
Passing Information to a Method or a Constructor
This method has four parameters: the loan amount, the interest rate, the future value and the number of periods. The first three are...
Read more >
Pass arguments - .NET MAUI | Microsoft Learn
Arguments can be passed to constructors and factory methods using the following .NET MAUI XAML language primitives:.
Read more >
What are the primary reasons you add arguments to a ... - Quora
Related to this is the need to construct immutable objects. If you don't pass all needed objects in the constructor it makes that...
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