@@ -110,7 +110,10 @@ describe('Order/Detail/AuditResult', () => {
110110 fireEvent . click ( screen . getByText ( 'audit.downloadSql' ) ) ;
111111
112112 expect ( download ) . toBeCalledTimes ( 1 ) ;
113- expect ( download ) . toBeCalledWith ( { task_id : '9999' } ) ;
113+ expect ( download ) . toBeCalledWith (
114+ { task_id : '9999' } ,
115+ { responseType : 'blob' }
116+ ) ;
114117 } ) ;
115118
116119 test ( 'should send download sql report request when click download sql button' , ( ) => {
@@ -124,14 +127,20 @@ describe('Order/Detail/AuditResult', () => {
124127 fireEvent . click ( screen . getByText ( 'audit.downloadReport' ) ) ;
125128
126129 expect ( download ) . toBeCalledTimes ( 1 ) ;
127- expect ( download ) . toBeCalledWith ( { task_id : '9999' , no_duplicate : false } ) ;
130+ expect ( download ) . toBeCalledWith (
131+ { task_id : '9999' , no_duplicate : false } ,
132+ { responseType : 'blob' }
133+ ) ;
128134
129135 const switchElement = getBySelector ( '.ant-switch' ) ;
130136 fireEvent . click ( switchElement ) ;
131137 fireEvent . click ( screen . getByText ( 'audit.downloadReport' ) ) ;
132138
133139 expect ( download ) . toBeCalledTimes ( 2 ) ;
134- expect ( download ) . toBeCalledWith ( { task_id : '9999' , no_duplicate : true } ) ;
140+ expect ( download ) . toBeCalledWith (
141+ { task_id : '9999' , no_duplicate : true } ,
142+ { responseType : 'blob' }
143+ ) ;
135144 } ) ;
136145
137146 test ( 'should send update sql describe request when user click update describe in table' , async ( ) => {
0 commit comments