Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow passing a function for command arguments #14

Merged
merged 6 commits into from
Mar 25, 2024

Conversation

MisanthropicBit
Copy link
Collaborator

@MisanthropicBit MisanthropicBit commented Feb 16, 2024

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 MisanthropicBit marked this pull request as ready for review March 3, 2024 21:23
@MisanthropicBit MisanthropicBit force-pushed the custom-mocha-arguments branch from b1d3d35 to d03e1fa Compare March 9, 2024 20:02
@MisanthropicBit
Copy link
Collaborator Author

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 adrigzr merged commit 780afb9 into adrigzr:main Mar 25, 2024
3 checks passed
@adrigzr
Copy link
Owner

adrigzr commented Mar 25, 2024

Sure, @MisanthropicBit! Thanks for your contributions 😄

@brianfiszman
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow passing to or generating arguments for mocha command invocation
3 participants