import React from 'react'; import $ from 'teaspoon'; import ControlLabel from '../src/ControlLabel'; import FormGroup from '../src/FormGroup'; import { shouldWarn } from './helpers'; describe('', () => { it('should render correctly', () => { expect( $( Label ) .shallowRender() .single('label.control-label.my-control-label[htmlFor="foo"]') .text() ).to.equal('Label'); }); it('should respect srOnly', () => { $( Label ) .shallowRender() .single('label.control-label.sr-only'); }); it('should use controlId for htmlFor', () => { $( Label ) .render() .single('label.control-label[htmlFor="foo"]'); }); it('should prefer explicit htmlFor', () => { shouldWarn('ignored'); $( Label ) .render() .single('label.control-label[htmlFor="bar"]'); }); });