Impara a testare i tuoi esercizi Gleam su Exercism
Dal terminale, spostati nella directory di base dell'esercizio, poi esegui i test con:
$ gleam test
Verrà eseguito il file di test che si trova nella sottocartella test, cioè un file che termina con _test.gleam
I test usano un framework di test personalizzato. Qualsiasi funzione pubblica nella directory test con un nome che termina in _test sarà considerata un test dal framework.
Per esempio:
import bob
import exercism/should
pub fn shouting_test {
bob.hey("WATCH OUT!")
|> should.equal("Whoa, chill out!")
}