williamthome / doctest

A library to test Erlang documentation
https://hex.pm/packages/doctest
Apache License 2.0
8 stars 1 forks source link

Implement an EUnit reporter #19

Closed williamthome closed 6 months ago

williamthome commented 6 months ago

This PR implements doctest_eunit_report, an Eunit reporter/listener. The goal is to provide a better experience with doctest in parallel with EUnit because EUnit is the basis of doc tests.

doctest_eunit_report

doctest_eunit_report provides a go-to definition for the exact location of the error and displays a portion of the code from where the error occurs, for example:

reporter-go-to-definition

eunit_progress | rebar3

rebar3 uses by default eunit_progress to print EUnit tests.

doctest_eunit_report vs eunit_progress

Below is a simple comparison between both EUnit reporters.

eunit_progress

Screenshot from 2024-05-14 22-01-44

doctest_eunit_report

Screenshot from 2024-05-14 22-02-39