芝麻web文件管理V1.00
编辑当前文件:/home/freeclou/app.optimyar.com/backend/node_modules/reactstrap/src/__tests__/Breadcrumb.spec.js
import React from 'react'; import { shallow } from 'enzyme'; import { Breadcrumb } from '../'; describe('Breadcrumb', () => { it('should render children', () => { const wrapper = shallow(
Yo!
); expect(wrapper.text()).toBe('Yo!'); }); it('should render "nav" by default', () => { const wrapper = shallow(
Yo!
); expect(wrapper.type()).toBe('nav'); }); it('should render "ol" by default', () => { const wrapper = shallow(
Yo!
); expect(wrapper.children().type()).toBe('ol'); }); it('should render with the "breadcrumb" class', () => { const wrapper = shallow(
Default Breadcrumb
); expect(wrapper.children().hasClass('breadcrumb')).toBe(true); }); it('should render custom tag', () => { const wrapper = shallow(
Yo!
); expect(wrapper.type()).toBe('main'); }); });