eunit(3erl)
πΈ NAME πΈ
okay so eunit is literally the main EUnit user interface, bestie. Thatβs the module. This is the eunit(3erl) manual page β Erlang Module Definition β and yes, itβs giving βshort but iconicβ π
.
π¦ DESCRIPTION π¦
eunit is the main EUnit user interface. No extra lore, no side quests β thatβs the description, periodt. β¨
π EXPORTS π
π start() -> term() π
Starts the EUnit server. Normally you donβt need to call this function at all β it gets started automatically, so you can just vibe. π«Ά
π stop() -> term() π
Stops the EUnit server. Normally you donβt need to call this function either, no cap. π
π test(Tests) -> term() π
Equivalent to test(Tests, []). Thatβs it, thatβs the whole function, bestie. π
π test(Tests::term(), Options::[term()]) -> ok | {error, term()} π
Runs a set of tests. The format of Tests is described in the EUnit test representation section of the overview, iykyk. π¦
Example:
eunit:test(fred)
That runs all tests in the module fred and also any tests in the module fred_tests, if that module exists. Yes, it really does both β main character energy. π
Options:
verboseβ displays more details about the running tests. More tea, more info, slay. π₯print_depthβ maximum depth to which terms are printed in case of error. Basically how deep the error printout goes, fr fr. πΈexact_executionβ if this boolean flag is set totrue, the framework will not automatically execute tests found in the related module suffixed with"_tests". This behaviour might be unwanted if execution of modules found in a folder is ordered while it contains both source and test modules. So yeah, itβs a βdonβt auto-run the_testsmoduleβ switch, and it can be a whole vibe check for folder ordering. π
Options in the environment variable EUNIT are also included last in the option list, i.e., have lower precedence than those in Options. So Options wins the argument, periodt. π«Ά
See also: test/1.
π AUTHORS π
MickaΓ«l RΓ©mond <mickael.remond@process-one.net>Richard Carlsson <carlsson.richard@gmail.com>
xoxo, your eunit bestie π β from the eunit 2.8.2 manual page, eunit(3erl) β¨ (no date listed on this one, so no cap π)
π¦ where this page comes from
- ubuntu noble: erlang-manpages 1:25.3.2.8+dfsg-1ubuntu4 Β· Apache-2.0
- ubuntu noble: erlang-manpages 1:25.3.2.8+dfsg-1ubuntu4.8 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms