mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-12-05 05:28:20 +08:00
78e9d58ef1
* refactor: out of bread item render * refactor: fix too filled * fix: render logic * test: add test case * fix: ts * fix: test
30 lines
634 B
TypeScript
30 lines
634 B
TypeScript
import React from 'react';
|
|
import { render } from '../../../tests/utils';
|
|
import Breadcrumb from '../index';
|
|
|
|
describe('Breadcrumb.ItemRender', () => {
|
|
it('render as expect', () => {
|
|
const { container } = render(
|
|
<Breadcrumb
|
|
items={[
|
|
{
|
|
path: '/',
|
|
title: 'Home',
|
|
},
|
|
{
|
|
path: '/bamboo',
|
|
title: 'Bamboo',
|
|
},
|
|
]}
|
|
itemRender={(route) => (
|
|
<a className="my-link" data-path={route.path}>
|
|
{route.title}
|
|
</a>
|
|
)}
|
|
/>,
|
|
);
|
|
|
|
expect(container).toMatchSnapshot();
|
|
});
|
|
});
|