Implements arg order is backwards

Open
#146 13 comments 12 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Refactor
Clarity
Mostly clear
Activity status
Stale
Tech stack
go
Domain
testing

Research direction

Search the repository for the Implements assertion and its tests, then compare its argument order with EqualError and Len. Review the existing discussion before changing this public API. Done means the argument order is consistent with the other assertions and the relevant tests pass.

Written by the indexing model from the issue text.

Description

Breaking Change

Most non-expected-actual functions, like EqualError and Len, put the object to be examined first and the expected value second, but Implements does it in reverse order: type first, then object. This makes it hard to remember.

Dominant language
Go
Stars
26.2k
Forks
1.9k
Avg merge
2d 4h
Merged PRs (30d)
2

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from stretchr/testify

All issues in stretchr/testify

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.