[bugfix] SwipeCell: incorrect render when left-width equals zero (#2737)

This commit is contained in:
neverland
2019-02-14 18:53:51 +08:00
committed by GitHub
parent a152309cfc
commit 7e774bcff2
3 changed files with 20 additions and 4 deletions

View File

@@ -64,3 +64,13 @@ test('on close prop', () => {
wrapper.trigger('click');
expect(wrapper.vm.offset).toEqual(0);
});
it('width equals zero', () => {
const wrapper = mount(SwipeCell, {
propsData: {
leftWidth: 0,
rightWidth: 0
}
});
expect(wrapper).toMatchSnapshot();
});