Skip to content
This repository was archived by the owner on Oct 9, 2019. It is now read-only.
This repository was archived by the owner on Oct 9, 2019. It is now read-only.

Option to log passing tests on "console" report #244

@pjfitzgibbons

Description

@pjfitzgibbons

Hello,
This is technically a "reopen" of #189.

I would love to have a way of running the tests and printing out the text from 'describe' through to the current 'test' before each test. e.g. if I have

suite =
    let
        trianglesPerSquare =
            2
    in
    describe "Grid"
        [ test "1x1" <|
            \_ ->
                let
                    grid =
                        Grid.grid (0,0) (10,10) 1 (\x y -> 0) (\x y z -> vec3 0 0.5 1)
                in
                Expect.equal (1 * trianglesPerSquare) (List.length grid)
	, test "1x2" <|
            \_ ->
                let
                    grid =
                        Grid.grid (0,0) (10,10) 2 (\x y -> 0) (\x y z -> vec3 0 0.5 1)
                in
                Expect.equal (4 * trianglesPerSquare) (List.length grid)
        ]

and I run "elm-test --trace" (or something, --logging, --status, --progress, i dunno) i would see something like

Running 2 tests. To reproduce these results, run: elm-test --fuzz 100 --seed 1126392036
Grid 1x1 ... passed
Grid 1x2 ... passed
TEST RUN PASSED

Per comment by mgold #189 (comment)

One of our design principles is that passing tests are uninteresting, beyond how many of them there were.

Do you want to

  • See the progress of tests while they are running
  • Be assured that the tests you specified are in fact running
  • Use tests to document behavior for someone who is not familiar with the code
  • Do performance profiling on your test suite

Yes, Literally all 4 of those reason I would like to have passing-test output.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions