MCPcopy Index your code
hub / github.com/matryer/is

github.com/matryer/is @v1.4.1 sqlite

repository ↗ · DeepWiki ↗ · release v1.4.1 ↗
41 symbols 105 edges 7 files 22 documented · 54% 11 cross-repo links
README

is GoDoc Go Report Card Build Status

Professional lightweight testing mini-framework for Go.

  • Easy to write and read
  • Beautifully simple API with everything you need: is.Equal, is.True, is.NoErr, and is.Fail
  • Use comments to add descriptions (which show up when tests fail)

Failures are very easy to read:

Examples of failures

Usage

The following code shows a range of useful ways you can use the helper methods:

func Test(t *testing.T) {

    is := is.New(t)

    signedin, err := isSignedIn(ctx)
    is.NoErr(err)            // isSignedIn error
    is.Equal(signedin, true) // must be signed in

    body := readBody(r)
    is.True(strings.Contains(body, "Hi there"))

}

Color

To turn off the colors, run go test with the -nocolor flag, or with the env var NO_COLOR (with any value).

go test -nocolor
NO_COLOR=1 go test

Extension points exported contracts — how you extend this code

T (Interface)
T reports when failures occur. testing.T implements this interface. [1 implementers]
is.go

Core symbols most depended-on inside this repo

Equal
called by 17
is.go
isNil
called by 7
is.go
New
called by 5
is.go
True
called by 5
is.go
NewRelaxed
called by 4
is.go
logf
called by 4
is.go
valWithType
called by 4
is.go
loadArguments
called by 4
is.go

Shape

Function 21
Method 17
Struct 2
Interface 1

Languages

Go100%

Modules by API surface

is.go22 symbols
is_test.go9 symbols
testdata/example_test.go3 symbols
is-1.7.go3 symbols
is-1.7_test.go2 symbols
is_helper_test.go1 symbols
is-before-1.7.go1 symbols

For agents

$ claude mcp add is \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact