Sha256: de5a84ec8a90d4bccf6ab6ad0a90c5110af08afff25ea9883d9bf66636468cd2
Contents?: true
Size: 813 Bytes
Versions: 160
Compression:
Stored size: 813 Bytes
Contents
import React from 'react'; import { shallow } from 'enzyme'; import toJson from 'enzyme-to-json'; import ProfileRpmCellFormatter from '../ProfileRpmsCellFormatter'; import { details } from '../../__tests__/moduleStreamDetails.fixtures'; describe('ProfileRpmCellFormatter', () => { it('should render and expand on click', () => { // eslint-disable-next-line prefer-destructuring const rpms = details.profiles[0].rpms; const wrapper = shallow(<ProfileRpmCellFormatter rpms={rpms} />); expect(toJson(wrapper)).toMatchSnapshot(); expect(wrapper.state('expanded')).toBeFalsy(); expect(wrapper.state('showAmount')).toBe(10); wrapper.instance().onClick(); expect(wrapper.state('expanded')).toBeTruthy(); expect(wrapper.state('showAmount')).toBe(rpms.length); }); });
Version data entries
160 entries across 160 versions & 1 rubygems