mirror of
https://github.com/zhigang1992/react.git
synced 2026-04-24 04:15:54 +08:00
16 lines
397 B
TypeScript
16 lines
397 B
TypeScript
import React from 'react'
|
|
import { mount } from 'enzyme'
|
|
import Ellipsis from '../ellipsis'
|
|
|
|
describe('Ellipsis', () => {
|
|
it('should render correctly', () => {
|
|
const wrapper = mount(
|
|
<div style={{ width: '1px' }}>
|
|
<Ellipsis height="10px">text</Ellipsis>
|
|
</div>,
|
|
)
|
|
expect(wrapper.html()).toMatchSnapshot()
|
|
expect(() => wrapper.unmount()).not.toThrow()
|
|
})
|
|
})
|