robin-rpr / inquirer-search-list

Inquirer.js Prompt to Fuzzy-Search a list of selectables 🔍
https://npmjs.com/package/inquirer-search-list
Other
30 stars 12 forks source link

fix/show name if choices are objects #1

Closed mitramejia closed 4 years ago

mitramejia commented 4 years ago

Summary

Hey man, great work on this plugin. I found a possible small issue and submitted a PR. Let me know what do you think.

Bug: shows [object Object] as the selected choice if choices are objects

bug

Expected choice.name is shown

success

Commits

Suggested test cases

  1. Should show selected choice name if prompt choices are valid objects
  2. Should return the selected choice object if prompt choices are valid objects
  3. Should show selected choice if prompt choices are strings
  4. Should return selected choice if prompt choices are strings

Questions

Are you open to adding tests using mocha/chai or similar?

robin-rpr commented 4 years ago

LGTM! Thanks so much ❤️

mitramejia commented 4 years ago

@robin-rpr great! thank you for merging. Are you open to adding tests using mocha/chai or similar?

robin-rpr commented 3 years ago

Hey @mitramejia , haven't been very active here lately, I'll add jest test cases for coverage with the next minor release coming around next week.

gokaybiz commented 2 years ago

Still have the same problem.