jasmine / jasmine-npm

A jasmine runner for node projects.
MIT License
376 stars 145 forks source link

not parsing argv after -- #155

Closed tharvik closed 4 years ago

tharvik commented 5 years ago

To allow for classic getopts argv parsing, one could now use -- also to separate arguments meant for the process from the ones for the subprocess (here, the tests run by jasmine). So now, one could do node jasmine.js -- test-specific-arguments. A nicer fix would be to provide the extracted subprocess arguments via a specific arguments list, such as jasmine.argv, to avoid redoing part of parsing.

slackersoft commented 5 years ago

Can you help me a bit to understand the problem you're trying to solve here? Jasmine doesn't have any subprocess things that it would be passing arguments along to, so I'm a bit confused on the use-case.

tharvik commented 5 years ago

In my case, I'm developping a small test framework which uses jasmine, but it needs some arguments from the overall testing infrastructure (such as using a configuration designed for testing). But, as jasmine is already consumming the whole arguments list, there is no way to separate the arguments for jasmine from the one intended for the test system below. Adding the parsing of -- allow to select the arguments meant for the sub-framework.

slackersoft commented 4 years ago

Ok, that sounds reasonable. I would like to see a couple of changes to this PR before it gets merged though.

tharvik commented 4 years ago

@slackersoft simple test & small usage message added