Closed tharvik closed 4 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.
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.
Ok, that sounds reasonable. I would like to see a couple of changes to this PR before it gets merged though.
@slackersoft simple test & small usage message added
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 donode jasmine.js -- test-specific-arguments
. A nicer fix would be to provide the extracted subprocess arguments via a specific arguments list, such asjasmine.argv
, to avoid redoing part of parsing.