Created
September 23, 2020 21:30
-
-
Save lai32290/94fc389676b85df88b748570a9cf25f9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
test('setOpenIndex sets the open index state properly', () => { | |
const wrapper = mount(<Accordion items={[]} />) | |
- expect(wrapper.state('openIndex')).toEqual(0) | |
+ expect(wrapper.state('openIndexes')).toEqual([0]) | |
wrapper.instance().setOpenIndex(1) | |
- expect(wrapper.state('openIndex')).toEqual(1) | |
+ expect(wrapper.state('openIndexes')).toEqual([1]) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment