From a85c140e663ef251eef822b842b204135dfff203 Mon Sep 17 00:00:00 2001 From: Samuel Lippert Date: Wed, 14 Sep 2022 16:02:03 -0500 Subject: [PATCH] Make test pass on purpose instead of by accident --- test/index.test.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/index.test.ts b/test/index.test.ts index ed61cd5b..1f3fc7c5 100644 --- a/test/index.test.ts +++ b/test/index.test.ts @@ -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() })