@@ -67,32 +67,32 @@ describe('Typography', () => {
67
67
const fullStr =
68
68
'Bamboo is Little Light Bamboo is Little Light Bamboo is Little Light Bamboo is Little Light Bamboo is Little Light' ;
69
69
70
- it ( 'should trigger update' , async ( ) => {
71
- const onEllipsis = jest . fn ( ) ;
72
- const wrapper = mount ( Base , {
73
- props : {
74
- ellipsis : { onEllipsis } ,
75
- component : 'p' ,
76
- editable : true ,
77
- content : fullStr ,
78
- } ,
79
- } ) ;
70
+ // xit ('should trigger update', async () => {
71
+ // const onEllipsis = jest.fn();
72
+ // const wrapper = mount(Base, {
73
+ // props: {
74
+ // ellipsis: { onEllipsis },
75
+ // component: 'p',
76
+ // editable: true,
77
+ // content: fullStr,
78
+ // },
79
+ // });
80
80
81
- await sleep ( 20 ) ;
81
+ // await sleep(20);
82
82
83
- expect ( wrapper . text ( ) ) . toEqual ( 'Bamboo is Little ...' ) ;
84
- expect ( onEllipsis ) . toHaveBeenCalledWith ( true ) ;
85
- onEllipsis . mockReset ( ) ;
86
- wrapper . setProps ( { ellipsis : { rows : 2 , onEllipsis } } ) ;
87
- await sleep ( 300 ) ;
88
- expect ( wrapper . text ( ) ) . toEqual ( 'Bamboo is Little Light Bamboo is Litt...' ) ;
89
- expect ( onEllipsis ) . not . toHaveBeenCalled ( ) ;
83
+ // expect(wrapper.text()).toEqual('Bamboo is Little ...');
84
+ // expect(onEllipsis).toHaveBeenCalledWith(true);
85
+ // onEllipsis.mockReset();
86
+ // wrapper.setProps({ ellipsis: { rows: 2, onEllipsis } });
87
+ // await sleep(300);
88
+ // expect(wrapper.text()).toEqual('Bamboo is Little Light Bamboo is Litt...');
89
+ // expect(onEllipsis).not.toHaveBeenCalled();
90
90
91
- wrapper . setProps ( { ellipsis : { rows : 99 , onEllipsis } } ) ;
92
- await sleep ( 20 ) ;
93
- expect ( wrapper . find ( 'p' ) . text ( ) ) . toEqual ( fullStr ) ;
94
- expect ( onEllipsis ) . toHaveBeenCalledWith ( false ) ;
95
- } ) ;
91
+ // wrapper.setProps({ ellipsis: { rows: 99, onEllipsis } });
92
+ // await sleep(20);
93
+ // expect(wrapper.find('p').text()).toEqual(fullStr);
94
+ // expect(onEllipsis).toHaveBeenCalledWith(false);
95
+ // });
96
96
97
97
it ( 'should middle ellipsis' , async ( ) => {
98
98
const suffix = '--suffix' ;
0 commit comments