adrigzr / neotest-mocha

Neotest runner for Mocha test framework
9 stars 9 forks source link

Allow passing a function for command arguments #14

Closed MisanthropicBit closed 5 months ago

MisanthropicBit commented 7 months ago

Closes #12.

I decided to only allow a function as an argument as passing a string[] directly wouldn't have the context of a results_path etc. Also since the command option is split on "%s+" which breaks strings like--grep='this is a test pattern', I thought this would be more flexible.

MisanthropicBit commented 5 months ago

Hey @adrigzr. Apologies but I can't merge this PR either due to the same reason as #15. Again, if you agree with the changes of course 🙂

This might also help fix #16 since you could pass a custom reporter that writes the test output to a json file instead of stdout for older versions of mocha. In that regard, I've updated the README to include a requirement of mocha 9.1.0+ to have support for writing the test output to a json file via the json reporter.

adrigzr commented 5 months ago

Sure, @MisanthropicBit! Thanks for your contributions 😄

brianfiszman commented 5 months ago

@MisanthropicBit gonna test to see if it solves the issue!