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

Improve test suite 2 #4

Merged
merged 6 commits into from
Apr 18, 2022
Merged

Improve test suite 2 #4

merged 6 commits into from
Apr 18, 2022

Conversation

alexevanczuk
Copy link
Contributor

@alexevanczuk alexevanczuk commented Apr 18, 2022

Summary

This is the first of two PRs to clean up the test suite.

This PR does the following:

  1. It takes common test setup that is an implementation detail (and thus distracts from the behavior of the test) into a common helper
  2. It cleans up some let blocks
  3. It removes an unnecessary, redundant context
  4. It adds some test cases for edge cases that are not covered whose behavior might change when I open a PR for danger-packwerk does not add an inline comment on deprecated_references.yml under some circumstances #2

The next PR will:

  1. Improve it block descriptions to be more clear about what the expected outcome is
  2. It will create a custom matcher have_inline_markdown that encapsulates some common test details, such as:
  • It ensures there are no other types of danger messages besides markdown
  • It identifies what line number the comment is on so its simpler to visualize the danger message

Commits

  • clean up common test setup
  • clean up let blocks
  • remove unnecessary context
  • Add some test cases

@alexevanczuk alexevanczuk requested a review from ngan April 18, 2022 14:09
Copy link
Collaborator

@technicalpickles technicalpickles left a comment

Choose a reason for hiding this comment

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

This will make a follow up PR much easier to read, thanks!

Left two suggestions on spelling of the filename, but those were also already there.

@alexevanczuk alexevanczuk merged commit 32808c3 into main Apr 18, 2022
@alexevanczuk alexevanczuk deleted the ae-improve-test-suite-1 branch April 18, 2022 15:37
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.

2 participants