UNPKG

lucid-ui

Version:

A UI component library from AppNexus.

35 lines 1.38 kB
import React from 'react'; import { shallow } from 'enzyme'; import { icons, common } from '../../../util/generic-tests'; import assert from 'assert'; import ChevronIcon from './ChevronIcon'; describe('ChevronIcon', function () { common(ChevronIcon); icons(ChevronIcon); describe('`direction` prop', function () { it('should render the correct class with "up"', function () { var wrapper = shallow( /*#__PURE__*/React.createElement(ChevronIcon, { direction: "up" })); assert.equal(wrapper.find('.lucid-ChevronIcon-is-up').length, 1); }); it('should render the correct class with "down"', function () { var wrapper = shallow( /*#__PURE__*/React.createElement(ChevronIcon, { direction: "down" })); assert.equal(wrapper.find('.lucid-ChevronIcon-is-down').length, 1); }); it('should render the correct class with "left"', function () { var wrapper = shallow( /*#__PURE__*/React.createElement(ChevronIcon, { direction: "left" })); assert.equal(wrapper.find('.lucid-ChevronIcon-is-left').length, 1); }); it('should render the correct class with "right"', function () { var wrapper = shallow( /*#__PURE__*/React.createElement(ChevronIcon, { direction: "right" })); assert.equal(wrapper.find('.lucid-ChevronIcon-is-right').length, 1); }); }); });