@@ -216,39 +216,6 @@ test('send(200, <Stream>) with error on same tick', async t => {
216
216
}
217
217
} )
218
218
219
- test ( 'custom error' , async t => {
220
- const fn = async ( ) => {
221
- sleep ( 50 )
222
- throw new Error ( '500 from test (expected)' )
223
- }
224
-
225
- const onError = ( req , res ) => {
226
- send ( res , 200 , 'got error' )
227
- }
228
-
229
- const url = await listen ( fn , { onError} )
230
- const res = await request ( url )
231
-
232
- t . deepEqual ( res , 'got error' )
233
- } )
234
-
235
- test ( 'custom async error' , async t => {
236
- const fn = async ( ) => {
237
- sleep ( 50 )
238
- throw new Error ( '500 from test (expected)' )
239
- }
240
-
241
- const onError = async ( req , res ) => {
242
- await sleep ( 50 )
243
- send ( res , 200 , 'got async error' )
244
- }
245
-
246
- const url = await listen ( fn , { onError} )
247
- const res = await request ( url )
248
-
249
- t . deepEqual ( res , 'got async error' )
250
- } )
251
-
252
219
test ( 'json parse error' , async t => {
253
220
const fn = async ( req , res ) => {
254
221
const body = await json ( req )
0 commit comments