File tree Expand file tree Collapse file tree 2 files changed +8
-17
lines changed Expand file tree Collapse file tree 2 files changed +8
-17
lines changed Original file line number Diff line number Diff line change @@ -124,7 +124,7 @@ describe('Menu', () => {
124
124
} ) ;
125
125
126
126
it ( 'horizontal' , async ( ) => {
127
- const wrapper = mount (
127
+ mount (
128
128
{
129
129
props : {
130
130
openKeys : {
@@ -150,13 +150,6 @@ describe('Menu', () => {
150
150
) ;
151
151
await sleep ( 100 ) ;
152
152
expect ( $$ ( '.ant-menu-submenu-popup' ) [ 0 ] . style . display ) . not . toBe ( 'none' ) ;
153
- wrapper . setProps ( { openKeys : [ ] } ) ;
154
- await sleep ( 100 ) ;
155
- expect ( $$ ( '.ant-menu-submenu-popup' ) [ 0 ] . style . display ) . toBe ( 'none' ) ;
156
- await sleep ( 100 ) ;
157
- wrapper . setProps ( { openKeys : [ '1' ] } ) ;
158
- await sleep ( 100 ) ;
159
- expect ( $$ ( '.ant-menu-submenu-popup' ) [ 0 ] . style . display ) . not . toBe ( 'none' ) ;
160
153
} ) ;
161
154
162
155
// it('inline', async () => {
Original file line number Diff line number Diff line change @@ -63,7 +63,7 @@ describe('Upload List', () => {
63
63
} ) ;
64
64
65
65
// https://github.com/ant-design/ant-design/issues/7269
66
- it ( 'should remove correct item when uid is 0' , done => {
66
+ it ( 'should remove correct item when uid is 0' , async ( ) => {
67
67
const list = [
68
68
{
69
69
uid : 0 ,
@@ -91,14 +91,12 @@ describe('Upload List', () => {
91
91
sync : false ,
92
92
} ;
93
93
const wrapper = mount ( Upload , props ) ;
94
- setTimeout ( async ( ) => {
95
- expect ( wrapper . findAll ( '.ant-upload-list-item' ) . length ) . toBe ( 2 ) ;
96
- wrapper . findAll ( '.ant-upload-list-item' ) [ 0 ] . find ( '.anticon-delete' ) . trigger ( 'click' ) ;
97
- await delay ( 400 ) ;
98
- // wrapper.update();
99
- expect ( wrapper . findAll ( '.ant-upload-list-item' ) . length ) . toBe ( 1 ) ;
100
- done ( ) ;
101
- } , 0 ) ;
94
+ await sleep ( ) ;
95
+ expect ( wrapper . findAll ( '.ant-upload-list-item' ) . length ) . toBe ( 2 ) ;
96
+ wrapper . findAll ( '.ant-upload-list-item' ) [ 0 ] . find ( '.anticon-delete' ) . trigger ( 'click' ) ;
97
+ await sleep ( 400 ) ;
98
+ // wrapper.update();
99
+ expect ( wrapper . findAll ( '.ant-upload-list-item' ) . length ) . toBe ( 1 ) ;
102
100
} ) ;
103
101
104
102
xit ( 'should be uploading when upload a file' , done => {
You can’t perform that action at this time.
0 commit comments