Skip to content

Commit

Permalink
types lint fix
Browse files Browse the repository at this point in the history
  • Loading branch information
guy-borderless committed Jan 1, 2025
1 parent f080ba7 commit bc0f426
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions functions/pipe_test.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.

import { assertEquals, assertThrows } from "@std/assert";
import { pipe } from "./mod.ts";
import { pipe } from "./pipe.ts";

Deno.test("pipe() handles mixed types", () => {
const inputPipe = pipe(
Math.abs,
Math.sqrt,
Math.floor,
(num) => `result: ${num}`,
(num: number) => `result: ${num}`,
);
assertEquals(inputPipe(-2), "result: 1");
});
Expand All @@ -23,10 +23,10 @@ Deno.test("pipe() throws an exceptions when a function throws an exception", ()
Math.abs,
Math.sqrt,
Math.floor,
(num) => {
(num: number) => {
throw new Error("This is an error for " + num);
},
(num) => `result: ${num}`,
(num: number) => `result: ${num}`,
);
assertThrows(() => inputPipe(-2));
});

0 comments on commit bc0f426

Please sign in to comment.