mirror of
https://github.com/zhigang1992/react.git
synced 2026-04-24 04:15:54 +08:00
style(prettier): format code style
This commit is contained in:
@@ -8,7 +8,7 @@ describe('Progress', () => {
|
||||
expect(wrapper.html()).toMatchSnapshot()
|
||||
expect(() => wrapper.unmount()).not.toThrow()
|
||||
})
|
||||
|
||||
|
||||
it('should work with different types', () => {
|
||||
const wrapper = mount(
|
||||
<div>
|
||||
@@ -16,34 +16,34 @@ describe('Progress', () => {
|
||||
<Progress value={21} type="success" />
|
||||
<Progress value={2} type="warning" />
|
||||
<Progress value={1} type="error" />
|
||||
</div>
|
||||
</div>,
|
||||
)
|
||||
expect(wrapper.html()).toMatchSnapshot()
|
||||
expect(() => wrapper.unmount()).not.toThrow()
|
||||
})
|
||||
|
||||
|
||||
it('should show different progress by maximum', () => {
|
||||
const wrapper = mount(
|
||||
<div>
|
||||
<Progress value={59} max={60} />
|
||||
<Progress value={21} max={50} />
|
||||
</div>
|
||||
</div>,
|
||||
)
|
||||
expect(wrapper.html()).toMatchSnapshot()
|
||||
expect(() => wrapper.unmount()).not.toThrow()
|
||||
})
|
||||
|
||||
|
||||
it('should fixed', () => {
|
||||
const wrapper = mount(
|
||||
<div>
|
||||
<Progress value={59} fixedTop />
|
||||
<Progress value={21} fixedBottom />
|
||||
</div>
|
||||
</div>,
|
||||
)
|
||||
expect(wrapper.html()).toMatchSnapshot()
|
||||
expect(() => wrapper.unmount()).not.toThrow()
|
||||
})
|
||||
|
||||
|
||||
it('should be render background-color with color prop', () => {
|
||||
const colors = {
|
||||
20: '#ccc',
|
||||
@@ -53,10 +53,10 @@ describe('Progress', () => {
|
||||
expect(wrapper.html()).toMatchSnapshot()
|
||||
expect(() => wrapper.unmount()).not.toThrow()
|
||||
})
|
||||
|
||||
|
||||
it('should be ignore wrong colors', () => {
|
||||
const colors = {
|
||||
'qq': '#ccc',
|
||||
qq: '#ccc',
|
||||
10: '#111',
|
||||
}
|
||||
const wrapper = mount(<Progress value={59} colors={colors} />)
|
||||
|
||||
Reference in New Issue
Block a user