Skip to content

Commit ce1dbb6

Browse files
committed
Pause checking for custom errors
1 parent 670fb43 commit ce1dbb6

File tree

1 file changed

+0
-33
lines changed

1 file changed

+0
-33
lines changed

test/index.js

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -216,39 +216,6 @@ test('send(200, <Stream>) with error on same tick', async t => {
216216
}
217217
})
218218

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-
252219
test('json parse error', async t => {
253220
const fn = async (req, res) => {
254221
const body = await json(req)

0 commit comments

Comments
 (0)