Skip to content

Commit 47145bd

Browse files
committed
fix: remove second argument to ifError
1 parent a0d1f20 commit 47145bd

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed

test/multipart-big-stream.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,6 @@ test('should emit fileSize limitation error during streaming', async function (t
8181
res.resume()
8282
await once(res, 'end')
8383
} catch (error) {
84-
t.assert.ifError(error, 'request')
84+
t.assert.ifError(error)
8585
}
8686
})

test/multipart-disk.test.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ test('should throw on file limit error', async function (t) {
178178
res.resume()
179179
await once(res, 'end')
180180
} catch (error) {
181-
t.assert.ifError(error, 'request')
181+
t.assert.ifError(error)
182182
}
183183
})
184184

@@ -225,7 +225,7 @@ test('should throw on file save error', async function (t) {
225225
res.resume()
226226
await once(res, 'end')
227227
} catch (error) {
228-
t.assert.ifError(error, 'request')
228+
t.assert.ifError(error)
229229
}
230230
})
231231

@@ -276,7 +276,7 @@ test('should not throw on request files cleanup error', { skip: process.platform
276276
res.resume()
277277
await once(res, 'end')
278278
} catch (error) {
279-
t.assert.ifError(error, 'request')
279+
t.assert.ifError(error)
280280
}
281281
})
282282

@@ -352,7 +352,7 @@ test('should throw on file limit error, after highWaterMark', async function (t)
352352
res.resume()
353353
await once(res, 'end')
354354
} catch (error) {
355-
t.assert.ifError(error, 'request')
355+
t.assert.ifError(error)
356356
}
357357
})
358358

test/multipart-fileLimit.test.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ test('should throw fileSize limitation error when consuming the stream', async f
6464
res.resume()
6565
await once(res, 'end')
6666
} catch (error) {
67-
t.assert.ifError(error, 'request')
67+
t.assert.ifError(error)
6868
}
6969
})
7070

@@ -127,7 +127,7 @@ test('should throw fileSize limitation error when consuming the stream MBs', asy
127127

128128
fs.unlinkSync(tmpFile)
129129
} catch (error) {
130-
t.assert.ifError(error, 'request')
130+
t.assert.ifError(error)
131131
}
132132
})
133133

@@ -187,7 +187,7 @@ test('should NOT throw fileSize limitation error when consuming the stream', asy
187187
t.assert.strictEqual(res.statusCode, 413)
188188
res.resume()
189189
} catch (error) {
190-
t.assert.ifError(error, 'request')
190+
t.assert.ifError(error)
191191
}
192192
})
193193

@@ -251,7 +251,7 @@ test('should throw fileSize limitation error when throwFileSizeLimit is globally
251251
res.resume()
252252
await once(res, 'end')
253253
} catch (error) {
254-
t.assert.ifError(error, 'request')
254+
t.assert.ifError(error)
255255
}
256256
})
257257

@@ -313,6 +313,6 @@ test('should NOT throw fileSize limitation error when throwFileSizeLimit is glob
313313
t.assert.strictEqual(res.statusCode, 413)
314314
res.resume()
315315
} catch (error) {
316-
t.assert.ifError(error, 'request')
316+
t.assert.ifError(error)
317317
}
318318
})

test/multipart-update-options-type.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ test('Should NOT throw RequestFileTooLargeError when throwFileSizeLimit: false f
108108
res.resume()
109109
await once(res, 'end')
110110
} catch (error) {
111-
t.assert.ifError(error, 'request')
111+
t.assert.ifError(error)
112112
}
113113
})
114114

0 commit comments

Comments
 (0)