Skip to content

Commit 16865c8

Browse files
committed
feat: upgrade oak
1 parent 51c1e13 commit 16865c8

File tree

2 files changed

+12
-10
lines changed

2 files changed

+12
-10
lines changed

test/deps.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
export { dirname, join } from "https://deno.land/[email protected]/path/mod.ts";
2-
export { expect } from "https://deno.land/x/[email protected]/mod.ts";
3-
export * as Opine from "https://deno.land/x/[email protected]/mod.ts";
4-
export * as Oak from "https://deno.land/x/[email protected]/mod.ts";
1+
export { dirname, join } from "https://deno.land/[email protected]/path/mod.ts";
2+
export { expect } from "https://deno.land/x/[email protected]/mod.ts";
3+
export * as Opine from "https://deno.land/x/[email protected]/mod.ts";
54
export { getFreePort } from "https://deno.land/x/[email protected]/mod.ts";
5+
6+
// TODO: upgrade to v13.0.0 - appear to be getting error when using AbortController
7+
export * as Oak from "https://deno.land/x/[email protected]/mod.ts";

test/superdeno.oak.test.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ const bootstrapOakServerTest = async (
3535
app.use(router.allowedMethods());
3636

3737
const controller = new AbortController();
38-
const { signal } = controller;
38+
const signal = controller.signal;
3939
const freePort = await getFreePort(random(1024, 49151));
4040

4141
app.addEventListener("listen", ({ hostname, port, secure }: any) => {
@@ -52,7 +52,7 @@ describe("Oak: superdeno(url)", () => {
5252
it("Oak: superdeno(url): should support open `superdeno(url)` format for web frameworks such as Oak", async (done) => {
5353
await bootstrapOakServerTest({
5454
configureApp: ({ router }) => {
55-
router.get("/", (ctx: Oak.RouterContext) => {
55+
router.get("/", (ctx) => {
5656
ctx.response.body = "hello";
5757
});
5858
},
@@ -71,7 +71,7 @@ describe("Oak: superdeno(url)", () => {
7171
it("Oak: superdeno(url): .expect(status, body[, fn]): should assert the response body and status", async (done) => {
7272
await bootstrapOakServerTest({
7373
configureApp: ({ router }) => {
74-
router.get("/", (ctx: Oak.RouterContext) => {
74+
router.get("/", (ctx) => {
7575
ctx.response.body = "foo";
7676
});
7777
},
@@ -89,7 +89,7 @@ describe("Oak: superdeno(url)", () => {
8989
it("superdeno(app): .expect(status, body[, fn]): should assert the response body and error status'", async (done) => {
9090
await bootstrapOakServerTest({
9191
configureApp: ({ router }) => {
92-
router.get("/", (ctx: Oak.RouterContext) => {
92+
router.get("/", (ctx) => {
9393
ctx.throw(400, "foo");
9494
});
9595
},
@@ -109,7 +109,7 @@ describe("Oak: superdeno(url)", () => {
109109
it("Oak: superdeno(url): .end(cb): should set `this` to the test object when calling the `cb` in `.end(cb)`", async (done) => {
110110
await bootstrapOakServerTest({
111111
configureApp: ({ router }) => {
112-
router.get("/", (ctx: Oak.RouterContext) => {
112+
router.get("/", (ctx) => {
113113
ctx.response.body = "hello";
114114
});
115115
},
@@ -133,7 +133,7 @@ describe("Oak: superdeno(app.handle)", () => {
133133
const router = new Router();
134134
const app = new Application();
135135

136-
router.get("/", (ctx: Oak.RouterContext) => {
136+
router.get("/", (ctx) => {
137137
ctx.response.body = "Hello Deno!";
138138
});
139139

0 commit comments

Comments
 (0)