Currently, the config argument passed into karma.config.js is an empty object, that gets filled out. It would be beneficial, to have access to command line arguments from within the configuration, through the passed config object, as this would allow custom logic, based on those arguments to be applied.
Example scenario: There are two test suites (eg. unit and component) in two different folders. It's desired to run only the selected test suite. This could easily be achieved by passing an argument on the command line (like suite=unit), that karma.config.js would have access to and would set the proper value on the config.files property.
What do people think about it? The implementation of this would be very straightforward (basically a one-liner).
Currently, the
configargument passed into karma.config.js is an empty object, that gets filled out. It would be beneficial, to have access to command line arguments from within the configuration, through the passedconfigobject, as this would allow custom logic, based on those arguments to be applied.Example scenario: There are two test suites (eg. unit and component) in two different folders. It's desired to run only the selected test suite. This could easily be achieved by passing an argument on the command line (like
suite=unit), that karma.config.js would have access to and would set the proper value on theconfig.filesproperty.What do people think about it? The implementation of this would be very straightforward (basically a one-liner).