Add unit tests

Built on top of #88.
Implements #87.
To activate requires adding an additional env line with `UNIT_TEST="1"`.