Skip to content

Conversation

@bizob2828
Copy link
Member

Description

In #2635 there was a question about helper.loadTestAgent. It inits a mock agent and adds an after/teardown to unload the agent. This PR updates all tests that could use that instead of being verbose within the tests.

@bizob2828 bizob2828 added the dev:tests Indicates only changes to tests label Oct 7, 2024
@codecov
Copy link

codecov bot commented Oct 7, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.18%. Comparing base (b522477) to head (555e4a4).
Report is 30 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2640      +/-   ##
==========================================
- Coverage   97.23%   97.18%   -0.05%     
==========================================
  Files         291      291              
  Lines       45941    45941              
==========================================
- Hits        44670    44648      -22     
- Misses       1271     1293      +22     
Flag Coverage Δ
integration-tests-cjs-18.x 74.17% <ø> (+<0.01%) ⬆️
integration-tests-cjs-20.x 74.18% <ø> (ø)
integration-tests-cjs-22.x 74.21% <ø> (-0.01%) ⬇️
integration-tests-esm-18.x 49.67% <ø> (ø)
integration-tests-esm-20.x 49.68% <ø> (ø)
integration-tests-esm-22.x 49.70% <ø> (ø)
unit-tests-18.x 88.87% <ø> (+0.01%) ⬆️
unit-tests-20.x 88.85% <ø> (-0.01%) ⬇️
unit-tests-22.x 88.88% <ø> (+0.01%) ⬆️
versioned-tests-18.x 78.96% <ø> (-0.16%) ⬇️
versioned-tests-20.x 78.95% <ø> (-0.19%) ⬇️
versioned-tests-22.x 78.95% <ø> (-0.19%) ⬇️

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.

Copy link
Contributor

@jsumners-nr jsumners-nr left a comment

Choose a reason for hiding this comment

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

I need to think about this some more. I prefer the code as it was before this proposal because it is clear and easy to follow. I am also skittish about hiding more t.after definitions inside of helper functions given that each test can only have a single t.after.

@bizob2828
Copy link
Member Author

I'll just close this

@bizob2828 bizob2828 closed this Nov 8, 2024
@jsumners-nr
Copy link
Contributor

Sorry. I completely forgot to come back to this.

@bizob2828 bizob2828 deleted the use-load-agent branch December 9, 2024 18:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dev:tests Indicates only changes to tests

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants