Skip to content

Commit

Permalink
fix: scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebastien Ringrose committed Sep 21, 2024
1 parent e991e46 commit e75ce63
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 10 deletions.
File renamed without changes.
4 changes: 2 additions & 2 deletions scripts/bun/profile.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Profiler from "../../lib/utils/Profiler.ts";
import { getTestRouter } from "../../tests/mocks/middleware.ts";
import { testHttpRouter } from "../../tests/mocks/httpRouter.ts";

const testRouter = getTestRouter();
const testRouter = testHttpRouter();
const server = Bun.serve({
port: 8080,
fetch(req) {
Expand Down
2 changes: 1 addition & 1 deletion scripts/deno/auth.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import router from "../../example/singleFileAuth/app.ts";
import router from "../../example/simpleAuth/app.ts";

router.middleware.unshift((ctx) => {
ctx.state.env = Deno.env.toObject();
Expand Down
4 changes: 2 additions & 2 deletions scripts/deno/profile.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Profiler from "../../lib/utils/Profiler.ts";
import { getTestRouter } from "../../tests/mocks/middleware.ts";
import { testHttpRouter } from "../../tests/mocks/httpRouter.ts";

const testRouter = getTestRouter();
const testRouter = testHttpRouter();
const abortController = new AbortController();
Deno.serve(
{
Expand Down
4 changes: 2 additions & 2 deletions scripts/wrangler/profile.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Profiler from "../../lib/utils/Profiler.ts";
import { getTestRouter } from "../../tests/mocks/middleware.ts";
import { testHttpRouter } from "../../tests/mocks/httpRouter.ts";

const testRouter = getTestRouter();
const testRouter = testHttpRouter();

const handleResults = await Profiler.run(testRouter, {
mode: "handle",
Expand Down
6 changes: 3 additions & 3 deletions tests/mocks/httpRouter.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { HttpBaseRouter } from "../../lib/routers/httpBaseRouter.ts";
import { HttpRouter } from "../../lib/routers/httpRouter.ts";
import {
testMiddleware2,
testMiddleware3,
testHandler,
testMiddleware1,
} from "./middleware.ts";

export const mockHttpBaseRouter = () => {
const router = new HttpBaseRouter();
export const testHttpRouter = () => {
const router = new HttpRouter();
router.addRoute(
"/test",
[testMiddleware1, testMiddleware2, testMiddleware3],
Expand Down

1 comment on commit e75ce63

@deno-deploy
Copy link

@deno-deploy deno-deploy bot commented on e75ce63 Sep 21, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Failed to deploy:

Module not found "file:///src/lib/routers/_Router.ts".

Please sign in to comment.