Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,25 @@ Shell into environment:

% esy shell

## Unit testing

There are two test-cases in `lib/Util.re`. There is a command to execute them:

% esy test:unit

First test-case uses [inline_test](https://github.com/janestreet/ppx_inline_test),
using the `let%test` that checks an expression is true.

Same library provides `let%test_unit` that checks there is no exception and `let%test_module` for grouping tests.

Second test-case uses [expect-test](https://github.com/janestreet/ppx_expect),
using `let%expect_test` with code that prints to stdout and `%expect` at the the end with the expected output.
If the output differs, there is a command to automatically update the `%expect` assertion to match the actual output:

% esy test:promote

This functionality is provided by [dune build system when running tests](https://dune.readthedocs.io/en/latest/tests.html)
Additional configuration as well as enabling the extension-points that the test-frameworks rely on is done in `lib/dune`

## Create Prebuilt Release:

Expand Down
2 changes: 1 addition & 1 deletion bin/Hello.re
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Console.log("Running Test Program:");
let () = print_endline(Lib.Util.hello());
let () = print_endline(Lib.Util.hello("World"));
Loading