diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/gleam/function_test.gleam | 8 | ||||
-rw-r--r-- | test/gleam/list_test.gleam | 6 |
2 files changed, 7 insertions, 7 deletions
diff --git a/test/gleam/function_test.gleam b/test/gleam/function_test.gleam index 0b3bd8c..e86beb3 100644 --- a/test/gleam/function_test.gleam +++ b/test/gleam/function_test.gleam @@ -18,17 +18,17 @@ pub fn compose_test() { // Takes a list of ints and returns the head as a string (if there is one, or // else "0" if there is not) - let head_to_string = - list.head + let first_to_string = + list.first |> function.compose(result.unwrap(_, 0)) |> function.compose(int.to_string) [1] - |> head_to_string + |> first_to_string |> should.equal("1") [] - |> head_to_string + |> first_to_string |> should.equal("0") } diff --git a/test/gleam/list_test.gleam b/test/gleam/list_test.gleam index b0d81c3..d505ddc 100644 --- a/test/gleam/list_test.gleam +++ b/test/gleam/list_test.gleam @@ -49,11 +49,11 @@ pub fn contains_test() { |> should.be_false } -pub fn head_test() { - list.head([0, 4, 5, 7]) +pub fn first_test() { + list.first([0, 4, 5, 7]) |> should.equal(Ok(0)) - list.head([]) + list.first([]) |> should.equal(Error(Nil)) } |