Skip to content

lpil/gleeunit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gleeunit

A simple test runner for Gleam, using EUnit on Erlang.

Documentation is available on HexDocs.

Usage

Add this package to your Gleam project.

gleam add gleeunit --dev

And then call the gleeunit.main function from your test main function.

// In test/yourapp_test.gleam
import gleeunit

pub fn main() {
  gleeunit.main()
}

Now any public function with a name ending in _test in the test directory will be found and run as a test.

pub fn some_function_test() {
  assert some_function() == "Hello!"
}

Run the tests by entering gleam test in the command line.

Deno

If using the Deno JavaScript runtime, you will need to add the following to your gleam.toml.

[javascript.deno]
allow_read = [
  "gleam.toml",
  "test",
  "build",
]

About

Gleam bindings for the Erlang EUnit test framework

Topics

Resources

License

Stars

Watchers

Forks

Contributors 15