Socket
Socket
Sign inDemoInstall

github.com/tj/assert

Package Overview
Dependencies
3
Alerts
File Explorer

Install Socket

Detect and block malicious and high-risk dependencies

Install

    github.com/tj/assert

Package assert implements the same assertions as the `assert` package but stops test execution when a test fails. The following is a complete example using require in a standard test function: The `require` package have same global functions as in the `assert` package, but instead of returning a boolean result they call `t.FailNow()`. Every assertion function also takes an optional string message as the final argument, allowing custom error messages to be appended to the message the assertion method outputs.


Version published

Readme

Source

assert GoDoc

Assertion pkg for Go, copied from github.com/stretchr/testify's require package.

I find early errors more useful than the t.Errorf() calls, which often fall through to nil pointers causing panics etc.

FAQs

Last updated on 08 Jun 2020

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc