Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify TestName determination when running tests (no need for Closure) #360

Merged
merged 2 commits into from
Jan 19, 2024

Conversation

jasondborneman
Copy link
Contributor

@jasondborneman jasondborneman commented Jan 19, 2024

By moving the defer recoverFromTestPanic into the synchronous text execution loop, we can eliminate the need for using a testNameFunc closure to get the test name. It's known within the loop when executing the test.

Tested that the correct test name is retrieved in case of runs + panics, parallel + synchronous.

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (b76a0f9) 93.24% compared to head (16ef81e) 93.24%.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #360   +/-   ##
=======================================
  Coverage   93.24%   93.24%           
=======================================
  Files          32       32           
  Lines        1822     1822           
=======================================
  Hits         1699     1699           
  Misses        100      100           
  Partials       23       23           
Flag Coverage Δ
micro 93.24% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@raphael
Copy link
Member

raphael commented Jan 19, 2024

This is great!

@raphael raphael merged commit 9f13014 into goadesign:main Jan 19, 2024
2 checks passed
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.

None yet

3 participants