1
0
Fork 0
selfhostblocks/docs/tutorials/unittests.md

25 lines
545 B
Markdown
Raw Normal View History

2023-03-07 09:09:54 +01:00
# Unit Tests
Unit tests are used in Self Host Blocks to check that parsing
configurations produce the expected result.
2023-03-07 09:18:56 +01:00
You can find all unit tests under the [tests/unit](/tests/unit) directory.
2023-03-18 05:07:37 +01:00
To run the units test, do:
```bash
nix-instantiate --eval --strict . -A tests.unit
```
If all tests pass, you'll see the following output:
```
{ }
```
Otherwise, you'll see one attribute for each failing test. For example, you can dig into the first failing haproxy test with:
```
nix-instantiate --eval --strict . -A tests.unit.haproxy.0
```