diff --git a/components/upload/__tests__/uploadlist.test.js b/components/upload/__tests__/uploadlist.test.js index 68fbab36ce..703a503366 100644 --- a/components/upload/__tests__/uploadlist.test.js +++ b/components/upload/__tests__/uploadlist.test.js @@ -508,8 +508,7 @@ describe('Upload List', () => { name: 'image', status: 'done', uid: '-12', - url: - 'https://publish-pic-cpu.baidu.com/1296beb3-50d9-4276-885f-52645cbb378e.jpeg@w_228%2ch_152', + url: 'https://publish-pic-cpu.baidu.com/1296beb3-50d9-4276-885f-52645cbb378e.jpeg@w_228%2ch_152', type: 'image/png', }, ]; @@ -637,14 +636,17 @@ describe('Upload List', () => { showUploadList={{ showRemoveIcon: true, showDownloadIcon: true, - removeIcon: () => RM, + showPreviewIcon: true, + removeIcon: RM, downloadIcon: DL, + previewIcon: PV, }} > , ); expect(wrapper.render()).toMatchSnapshot(); + wrapper.unmount(); const wrapper2 = mount( { showUploadList={{ showRemoveIcon: true, showDownloadIcon: true, - removeIcon: RM, + showPreviewIcon: true, + removeIcon: () => RM, downloadIcon: () => DL, + previewIcon: () => PV, }} > , ); expect(wrapper2.render()).toMatchSnapshot(); - - wrapper.unmount(); wrapper2.unmount(); });