Skip to content

Commit

Permalink
fix-never
Browse files Browse the repository at this point in the history
  • Loading branch information
uriva committed Nov 10, 2024
1 parent a712ea2 commit 00588d5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
9 changes: 8 additions & 1 deletion src/taskBouncer.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
import { bouncerServer } from "./taskBouncer.ts";
import { bouncerServer, staticFileEndpoint } from "./taskBouncer.ts";

Deno.test("init", async () => {
const server = await bouncerServer("http://localhost", "1234", []);
server.close();
});

Deno.test("static endpoint", async () => {
const server = await bouncerServer("http://localhost", "1234", [
staticFileEndpoint("<div>hello</div>", "text/html", "/hello"),
]);
server.close();
});
3 changes: 2 additions & 1 deletion src/taskBouncer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,8 @@ export const staticFileEndpoint = (
text: string,
contentType: string,
triggerUrl: string,
): Endpoint<never> => ({
// deno-lint-ignore no-explicit-any
): Endpoint<any> => ({
predicate: ({ url, method }) => method === "GET" && url === triggerUrl,
bounce: false,
handler: (_, res) => {
Expand Down

0 comments on commit 00588d5

Please sign in to comment.