Skip to content
This repository was archived by the owner on Mar 17, 2025. It is now read-only.

khulnasoft/checkmate

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

161 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Instructions

checkmate is meant to ease migrating off of gopkg.in/check.v1 and use the Go stdlib testing package instead. It achieves this by embedding a *testing.T in *check.C and ripping out the test runner code. This means that the following is now possible:

func myUsefulHelper(tb testing.TB, ...) {
    // ...
}

func (s *Suite) TestSomething(c *C) {
    myUsefulHelper(c, ...)
}

Use it as a global replacement:

$ go mod edit -replace=gopkg.in/check.v1=github.com/khulnasoft/checkmate

Or replace imports manually:

import . "github.com/khulnasoft/checkmate"
import check "github.com/khulnasoft/checkmate"

Caveats

This library differs from upstream check in the following ways:

  • Run*() and TestingT() don't block until all tests have run
  • Run*() don't return Result anymore, due to the above
  • C.Succeed*() fails the test since there is no analog in *testing.T
  • RunConfig.KeepWorkDir is not supported
  • Any flags that are not benchmark related cause an error
  • The output format of check is not preserved

About

Rich testing for the Go language

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Go 100.0%