- Notifications
You must be signed in to change notification settings - Fork19
Gleam bindings for the Erlang EUnit test framework
License
NotificationsYou must be signed in to change notification settings
lpil/gleeunit
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Gleam bindings to the Erlang EUnit test framework.
A custom test runner is included for when compiled to JavaScript running oneither NodeJS or Deno.
Documentation is available onHexDocs.
Add this package to your Gleam project.
gleam add gleeunit --dev
And then call thegleeunit.main
function from your test main function.
// In test/yourapp_test.gleamimportgleeunitpubfnmain(){gleeunit.main()}
Now any public function with a name ending in_test
in thetest
directorywill be found and run as a test.
pubfnthe_universe_test(){letassert1=1}
Run the tests by enteringgleam test
in the command line.
If using the Deno JavaScript runtime, you will need to add the following to yourgleam.toml
.
[javascript.deno]allow_read = ["gleam.toml","test","build",]
About
Gleam bindings for the Erlang EUnit test framework