Skip to content

Move all tests to ./tests/ with new Go module to isolate testing dependencies #58

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

Merged
merged 2 commits into from
Jul 4, 2025

Conversation

endigma
Copy link
Contributor

@endigma endigma commented Apr 29, 2025

Summary

  • Moves tests into tests/ package, which is its own go module, to isolate testing dependencies from the main package
    • This makes it an easier decision to include litter in independent, downstream testing packages similar to testify, which was previously an indirect dependency of litter itself
    • It can confuse users when they install a testify alternative and it pulls in testify indirectly
    • This also caused litter to indirectly import its own alternative, spew, via testify
    • Also allows tests to freely import essentially any 3rd party package to add tests when an issue is resolved to prevent regressions
  • Uses assert.Equal instead of the diff shellout, which may be uglier but is more reliable, was making a fuss about trailing newlines or something I didn't want to debug

@endigma endigma requested a review from atombender April 30, 2025 20:39
@endigma
Copy link
Contributor Author

endigma commented Jul 4, 2025

@atombender what does this need to be merged? should I just make a fork?

@atombender
Copy link
Member

Hi, sorry about this, I plain forgot about it. I'll look now.

@atombender atombender merged commit a7065ec into sanity-io:main Jul 4, 2025
2 checks passed
@atombender
Copy link
Member

Sorry about the delay. Appreciate the improvements. If you have more work you want to get committed, I'm going to try prioritizing reviews!

@endigma endigma deleted the separate-tests-package branch July 4, 2025 10:06
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