UNPKG

@navinc/base-react-components

Version:
19 lines (17 loc) 704 B
import React from 'react' import BlockQuote from './block-quote' import { shallow } from 'enzyme' describe('Block Quote', () => { it('test the children of the block quote', () => { const wrapper = shallow(<BlockQuote>hello there</BlockQuote>) const element = wrapper.props().children expect(element.props.children).toBe('hello there') expect(element.props.color).toBe(undefined) }) it('make sure that color props go though', () => { const wrapper = shallow(<BlockQuote color="oceanBoat">general kenobi</BlockQuote>) const element = wrapper.props().children expect(element.props.children).toBe('general kenobi') expect(element.props.color).toBe('oceanBoat') }) })