Skip to content

refactor: rename testing pacakge to rotesting#233

Merged
samber merged 4 commits intomainfrom
refactor/rename-testing-package
Feb 27, 2026
Merged

refactor: rename testing pacakge to rotesting#233
samber merged 4 commits intomainfrom
refactor/rename-testing-package

Conversation

@samber
Copy link
Owner

@samber samber commented Feb 27, 2026

No description provided.

Copilot AI review requested due to automatic review settings February 27, 2026 19:44
@claude
Copy link

claude bot commented Feb 27, 2026

Claude finished @samber's task in 1m 2s —— View job


PR Review: Rename testing package to rotesting

Summary

This PR correctly renames the internal testing package to rotesting to avoid naming collisions with Go's standard library testing package. The refactoring is well-executed with all imports and usages properly updated.

Changes Verified

  • Package name changed from package testing to package rotesting in all files:

    • testing/spec.go
    • testing/assert.go
    • testing/assert_test.go
  • Import alias correctly updated in:

    • plugins/testify/testify.go (rotesting "github.com/samber/ro/testing")
    • plugins/testify/testify_test.go
  • Documentation (docs/docs/testing.md) correctly uses rotesting alias

  • The rorotesting typo mentioned in previous review comments has been fixed in commit c6f41c7

Breaking Change Notice

This is a breaking change for downstream users who currently import "github.com/samber/ro/testing" and use testing.Assert(...) without an import alias. Users will need to update to:

import rotesting "github.com/samber/ro/testing"

Recommendation

LGTM with the note that this should be called out in release notes as a breaking change.


Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Renames the internal Go package name for the /testing import path to rotesting (to reduce collisions with the stdlib testing package) and updates usages in the testify plugin and documentation accordingly.

Changes:

  • Rename package declaration from package testing to package rotesting in the /testing directory.
  • Update plugins/testify to import and reference rotesting.AssertSpec.
  • Update docs to show importing the /testing package as rotesting (but one snippet currently has a typo).

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
testing/spec.go Renames package declaration to rotesting.
testing/assert.go Renames package declaration to rotesting.
testing/assert_test.go Renames package declaration to rotesting.
plugins/testify/testify.go Updates import alias and type references from testing to rotesting.
docs/docs/testing.md Updates documentation imports/usages to rotesting (one usage is currently incorrect).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@samber samber merged commit 1a3a9be into main Feb 27, 2026
15 checks passed
@samber samber deleted the refactor/rename-testing-package branch February 27, 2026 19:52
@codecov-commenter
Copy link

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 65.04%. Comparing base (84beb92) to head (c6f41c7).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #233   +/-   ##
=======================================
  Coverage   65.04%   65.04%           
=======================================
  Files          95       95           
  Lines        9104     9104           
=======================================
  Hits         5922     5922           
  Misses       3088     3088           
  Partials       94       94           
Flag Coverage Δ
unittests 65.04% <100.00%> (ø)

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.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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