diff --git a/deno_dist/index.ts b/deno_dist/index.ts index f9036910..48d10319 100644 --- a/deno_dist/index.ts +++ b/deno_dist/index.ts @@ -1,8 +1,5 @@ -import Toucan from 'https://cdn.skypack.dev/toucan-js@2.6.1' -import type { - Context, - Handler, -} from 'https://raw.githubusercontent.com/honojs/hono/v2.0.6/deno_dist/mod.ts' +import type { Context, Handler } from 'https://raw.githubusercontent.com/honojs/hono/v2.0.6/deno_dist/mod.ts' +import Toucan from "https://cdn.skypack.dev/toucan-js@2.6.1" declare module 'https://raw.githubusercontent.com/honojs/hono/v2.0.6/deno_dist/mod.ts' { interface ContextVariableMap { diff --git a/deno_test/index.test.ts b/deno_test/index.test.ts index 64960be5..df6b4c2b 100644 --- a/deno_test/index.test.ts +++ b/deno_test/index.test.ts @@ -4,17 +4,6 @@ import { assertEquals, Hono } from './deps.ts' // Test just only minimal patterns. // Because others are tested well in Cloudflare Workers environment already. - -// Mock -class Context implements ExecutionContext { - passThroughOnException(): void { - throw new Error('Method not implemented.') - } - async waitUntil(promise: Promise): Promise { - await promise - } -} - Deno.test('Sentry Middleware', async () => { const app = new Hono() app.use( @@ -29,12 +18,12 @@ Deno.test('Sentry Middleware', async () => { }) let req = new Request('http://localhost/sentry/foo') - let res = await app.fetch(req, {}, new Context()) + let res = await app.fetch(req) assertNotEquals(res, null) assertEquals(res.status, 200) req = new Request('http://localhost/sentry/error') - res = await app.fetch(req, {}, new Context()) + res = await app.fetch(req) assertNotEquals(res, null) assertEquals(res.status, 500) })