Make test pass on purpose instead of by accident
parent
8e290c0b70
commit
a85c140e66
|
@ -21,7 +21,7 @@ describe('Sentry middleware', () => {
|
|||
|
||||
app.use('/sentry/*', sentry(undefined, callback))
|
||||
app.get('/sentry/foo', (c) => c.text('foo'))
|
||||
app.get('/sentry/bar', (c) => getSentry(c).log('bar') && c.text('bar'))
|
||||
app.get('/sentry/bar', (c) => getSentry(c).log('bar') || c.text('bar'))
|
||||
app.get('/sentry/error', () => {
|
||||
throw new Error('a catastrophic error')
|
||||
})
|
||||
|
@ -38,7 +38,7 @@ describe('Sentry middleware', () => {
|
|||
const req = new Request('http://localhost/sentry/bar')
|
||||
const res = await app.fetch(req, {}, new Context())
|
||||
expect(res).not.toBeNull()
|
||||
expect(res.status).toBe(500)
|
||||
expect(res.status).toBe(200)
|
||||
expect(log).toHaveBeenCalled()
|
||||
})
|
||||
|
||||
|
|
Loading…
Reference in New Issue