stretchr / testify

A toolkit with common assertions and mocks that plays nicely with the standard library
MIT License
23.53k stars 1.6k forks source link

Update documentation for the Error function in assert or require package #1675

Open architagr opened 2 weeks ago

architagr commented 2 weeks ago

Summary

Incorrect assert.Error() docs

Changes

Removing the if statement and the Equal call from the example.

Motivation

Since we already have EqualError, the documentation is trying to use assert.Equal to assert the error object's content.

Related issues

Closes #1609