lpil / gleeunit

Gleam bindings for the Erlang EUnit test framework
Apache License 2.0
23 stars 17 forks source link

refactor main to create main_with and add coverage #19

Closed manuel-rubio closed 1 year ago

manuel-rubio commented 1 year ago

The idea is to let us use main_with in this way:

pub fn main() {
  gleeunit.main_with([Colored(True), Profile(True), Coverage(True)])
}

That's letting us to activate profile (which couldn't be activated previously, change the coloured if we want and add the new coverage option to generate:

Finished in 0.062 seconds
14 tests, 0 failures

Test coverage:

Module                       Perc% (Covered/Total)
-------------------------- ------- ---------------
gleeunit.erl                 0.00% (0/35)
gleeunit@should.erl          0.00% (0/9)
gleeunit_binomial_heap.erl  62.50% (20/32)
gleeunit_ffi.erl            16.28% (7/43)
gleeunit_progress.erl       34.78% (80/230)
lpil commented 1 year ago

Hello! Thanks for this, but I'm not looking to add any more features to this library. It is just a hack to have a way to run tests, and I don't think it is a good foundation for Gleam testing going forward. Any contributions would be better going to a new test framework, or the more featureful fork Glacier

manuel-rubio commented 1 year ago

Thanks for the information. Keeping in mind that, maybe you should put a note about this was experimental or even archive this and put a note in the hex package to inform the people that should use Glacier instead ;-)

lpil commented 1 year ago

It's not experimental or deprecated, and no other package is endorsed by Gleam core. In future when we have a more mature framework that isn't based off of eunit we can move to that and retire this one