Skip to content

how to create tests for ValueParser #5213

Answered by epage
nbari asked this question in Q&A
Discussion options

You must be logged in to vote

Some options

  • Have tests call Command::try_get_matches_from and pass in different combinations and verify the result
  • Split the closure out and test the closure
  • Switched from returning ValueParser to impl TypedValueParser and write tests against TypedValueParser::parse

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by nbari
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants