startest/expect
Assertions to be used in tests.
Functions
pub fn list_to_contain(actual: List(a), expected: a) -> Nil
Asserts that the given list contains the expected element.
pub fn list_to_not_contain(actual: List(a), expected: a) -> Nil
Asserts that the given list does not contain the expected element.
pub fn string_to_contain(actual: String, expected: String) -> Nil
Asserts that the given string contains the expected string.
pub fn string_to_end_with(
actual: String,
expected: String,
) -> Nil
Asserts that the given string ends with the expected string.
pub fn string_to_not_contain(
actual: String,
expected: String,
) -> Nil
Asserts that the given string does not contain the expected string.
pub fn string_to_not_end_with(
actual: String,
expected: String,
) -> Nil
Asserts that the given string does not end with the expected string.
pub fn string_to_not_start_with(
actual: String,
expected: String,
) -> Nil
Asserts that the given string does not start with the expected string.
pub fn string_to_start_with(
actual: String,
expected: String,
) -> Nil
Asserts that the given string starts with the expected string.
pub fn to_be_error(actual: Result(a, b)) -> b
Asserts that the given value is Error(_)
.
pub fn to_equal(actual: a, expected expected: a) -> Nil
Asserts that the given value is equal to the expected value.
pub fn to_loosely_equal(
actual: Float,
expected expected: Float,
tolerating tolerance: Float,
) -> Nil
Asserts that the given Float
is equal to the expected Float
within the
provided tolerance.
pub fn to_not_equal(actual: a, expected expected: a) -> Nil
Asserts that the given value is not equal to the expected value.
pub fn to_not_throw(f: fn() -> a) -> a
Asserts that the given function does not throw an error.