aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorinoas <mail@inoas.com>2022-04-05 12:28:16 +0200
committerLouis Pilfold <louis@lpil.uk>2022-04-06 10:58:14 +0100
commit3f036e797c7ac7cca7f3cde8095a2828e172976c (patch)
tree40e5dbdb064b7f3d1fa9f153ccd2b49a4a594dbb /test
parent224f0e8d94293813dee8ee868b6ce02cddb7820d (diff)
downloadgleam_stdlib-3f036e797c7ac7cca7f3cde8095a2828e172976c.tar.gz
gleam_stdlib-3f036e797c7ac7cca7f3cde8095a2828e172976c.zip
add test
Diffstat (limited to 'test')
-rw-r--r--test/gleam/function_test.gleam7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/gleam/function_test.gleam b/test/gleam/function_test.gleam
index 27e8b0d..7fab989 100644
--- a/test/gleam/function_test.gleam
+++ b/test/gleam/function_test.gleam
@@ -6,6 +6,7 @@ import gleam/pair
import gleam/list
import gleam/result
import gleam/string
+import gleam/io
pub fn compose_test() {
let add_two = fn(int: Int) { int + 2 }
@@ -114,3 +115,9 @@ pub fn constant_test() {
|> pair.map_first(function.constant(42))
|> should.equal(#(42, 2))
}
+
+pub fn tap_test() {
+ "Thanks Joe & Louis"
+ |> function.tap(io.print)
+ |> should.equal("Thanks Joe & Louis")
+}