this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Document basic usage

+23 -12
+23 -12
README.md
··· 1 1 # gleeunit 2 2 3 - A Gleam project 3 + Gleam bindings to the Erlang EUnit test framework. 4 4 5 - ## Quick start 5 + ## Usage 6 6 7 - ```sh 8 - gleam run # Run the project 9 - gleam test # Run the tests 10 - gleam shell # Run an Erlang shell 7 + Add this package to your `gleam.toml` dependencies: 8 + 9 + ```toml 10 + [dev-dependencies] 11 + gleeunit = "~> 0.1.0" 11 12 ``` 12 13 13 - ## Installation 14 + And then call the `discover_and_run_tests` function from your test main function. 15 + 16 + ```gleam 17 + // In test/yourapp_test.gleam 18 + import gleeunit 19 + 20 + pub fn main() { 21 + gleeunit.discover_and_run_tests() 22 + } 23 + ``` 14 24 15 - If available on Hex this package can be installed by adding `gleeunit` 16 - to your `gleam.toml` dependencies: 25 + Now any public function with a name ending in `_test` in the `test` directory 26 + will be found and run as a test. 17 27 18 - ```erlang 19 - [dependencies] 20 - gleeunit = "~> 0.1.0" 28 + ```gleam 29 + pub fn the_universe_test() { 30 + assert 1 = 1 31 + } 21 32 ```