Testing on the Gleam track

Learn how to test your Gleam exercises on Exercism


From the terminal, change to the base directory of the exercise then execute the tests with:

$ gleam test

This will execute the test file found in the test subfolder -- a file ending in _test.gleam

Test functions

The tests use a custom test framework. Any public function in the test directory with a name ending in _test will be considered a test by the test framework.

For example:

import bob
import exercism/should

pub fn shouting_test {
  bob.hey("WATCH OUT!")
  |> should.equal("Whoa, chill out!")
}