stretchr / testify

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

AnythingOfType is marked deprecated on pkgsite #1573

Open brackendawson opened 3 months ago

brackendawson commented 3 months ago

Description

On pkgsite mock.AnythingOfType is marked as deprecated.

mock.AnythingOfTypeArgument was marked deprecated by #1441. But because AnythingOfType is a factory function for AnythingOfTypeArgument and factory functions are shown nested under the type, this gets deprecated too.

This is problematic because the AnythingOfTypeArgument deprecation notice says to use AnythingOfType.

Running pkgsite locally shows this is fixed if AnythingOfType returns the unexported anythingOfTypeArgument, as it's a type alias that shouldn't be a breaking change.

My VSCode doesn't reflect this:

image

Step To Reproduce

View public docs for mock package on pkgsite

Expected behavior

AnythingOfTypeArgument deprecated, AnythingOfType not.

Actual behavior

Both deprecated.

dolmen commented 3 months ago

This will be fixed by #1578.