reactabular-select - Add basic tests
See original GitHub issueTest plan:
byArrowKeys:
- Up arrow pressed, no
selectedRowIndex
provided -> nothing should happen. - Down arrow pressed, no
selectedRowIndex
provided -> nothing should happen. - Up arrow pressed,
selectedRowIndex
provided and it’s larger than zero ->onSelectRow
should get called withselectedRowIndex - 1
. - Down arrow pressed, no
selectedRowIndex
provided and it’s smaller thanrows
length - 1 ->onSelectRow
should get called withselectedRowIndex + 1
.
selectRow:
- Assuming
rows
containsselected
flags andisSelected
does not match any, allselected
flags should becomefalse
. - If
isSelected
matches a row, the resultingrows
should have matching ones with theselected
flag set astrue
.selectRow
should also returnselectedRows
within an array (currently it returns just the lastselectedRow
!).
Issue Analytics
- State:
- Created 7 years ago
- Comments:20 (20 by maintainers)
Top Results From Across the Web
How to test a select element with React Testing Library
Learn how to test a select/dropdown element with React Testing Library. We focus on writing tests the way a real user would interact...
Read more >Testing a Custom Select with React Testing Library
A large number of projects need a custom select. At first sight, they seem simple components, but in reality, they are quite complex....
Read more >Testing React Select component - Stack Overflow
I would like to use React-Select react component, but I need to add tests. I've tried several options I found with google, but...
Read more >rezamt/reactable: Testing react-table - GitHub
This project was bootstrapped with Create React App. Below you will find some information on how to perform common tasks.
Read more >Building and Testing a Select Component - Debbie O'Brien
Building a Select component with a Composition to see the component render in isolation as well as Tests using React Testing Library to...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Moved to selectabular. Closing.
I’ll probably remove selection bits from reactabular in the next major release and rewrite documentation accordingly.
Yup I was referring exactly at that basic config: jest + babel + eslint. I’m usually more on the side of ava/tape for tests, must confess I’m quite liking Jest 😃