Replaced test by it in tests

This commit is contained in:
Alejandro Celaya
2021-03-06 17:25:09 +01:00
parent 426d000a59
commit e380ddb40f
5 changed files with 14 additions and 14 deletions

View File

@@ -14,13 +14,13 @@ describe('<DateIntervalDropdownItems />', () => {
afterEach(jest.clearAllMocks);
afterEach(() => wrapper?.unmount());
test('expected amount of items is rendered', () => {
it('renders expected amount of items', () => {
const items = wrapper.find(DropdownItem);
expect(items).toHaveLength(DATE_INTERVALS.length);
});
test('expected item is active', () => {
it('sets expected item as active', () => {
const items = wrapper.find(DropdownItem);
const EXPECTED_ACTIVE_INDEX = 5;
@@ -28,7 +28,7 @@ describe('<DateIntervalDropdownItems />', () => {
items.forEach((item, index) => expect(item.prop('active')).toEqual(index === EXPECTED_ACTIVE_INDEX));
});
test('selecting an element triggers onChange callback', () => {
it('triggers onChange callback when selecting an element', () => {
const items = wrapper.find(DropdownItem);
items.at(2).simulate('click');