Skip to content

Add todo reporting#67

Open
richardcocks wants to merge 5 commits into
lpil:mainfrom
richardcocks:add-todo-reporting
Open

Add todo reporting#67
richardcocks wants to merge 5 commits into
lpil:mainfrom
richardcocks:add-todo-reporting

Conversation

@richardcocks

Copy link
Copy Markdown

Satisfies #61

This adds todo reporting as a separate category in the final summary.

When there are only failing todos and no failures from asserts or panics, then this will show yellow, but still exit code 1, so will still fail in CI environments, to maintain compatibility with current behaviour.

There are a number of accomodations that had to be made to get this tested within this repository. I had to suppress the raw test output, so that it is not confused with the tests being asserted in the test module. Then in order to that in a compatible way, I had to special case Node and Deno handling.

@lpil

lpil commented May 7, 2026

Copy link
Copy Markdown
Owner

Hello! Are you still working on this?

@richardcocks

Copy link
Copy Markdown
Author

Sorry, I thought I had marked it ready for review already.

@richardcocks richardcocks marked this pull request as ready for review May 7, 2026 19:03

@lpil lpil left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!! I've left a comment inline.

Comment thread src/gleeunit_progress.erl

handle_cancel(_test_or_group, Data, State) ->
?reporting:test_failed(State, <<"gleeunit">>, <<"main">>, Data).
handle_cancel(test, Data, State) ->

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's this new code for? It seems unrelated to todo?

I think it might be code for another feature that got included by mistake?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added it to support a case when the todo was hit inside a spawned process ( i.e. OTP ), it wasn't reporting it correctly as a todo. If you prefer to leave that case unsupported this can be removed, and they'll continue to fail via error as current behaviour.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I couldn't really add a good test case to demonstrate / cover this within the tests without bringing in dependencies that wouldn't be wanted in this repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants