• Stars
    star
    1,731
  • Rank 26,926 (Top 0.6 %)
  • Language
    Go
  • License
    MIT License
  • Created almost 8 years ago
  • Updated 10 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Professional lightweight testing mini-framework for Go.

is GoDoc Go Report Card

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

More Repositories

1

xbar

Put the output from any script or program into your macOS Menu Bar (the BitBar reboot)
Go
17,509
star
2

xbar-plugins

Plugin repository for xbar (the BitBar reboot)
Shell
2,446
star
3

moq

Interface mocking tool for go generate
Go
1,884
star
4

vice

Go channels at horizontal scale (powered by message queues)
Go
1,540
star
5

goblueprints

Source code for Go Programming Blueprints
Go
1,346
star
6

silk

Markdown based document-driven RESTful API testing.
Go
939
star
7

gopherize.me

Gopherize.me app
JavaScript
649
star
8

try

Simple idiomatic retry package for Go
Go
332
star
9

way

HTTP routing for Go 1.7
Go
194
star
10

drop

Dependency-less dependencies for Go.
Go
120
star
11

goscript

Goscript: Runtime execution of Go code.
Go
103
star
12

runner

Interruptable goroutines
Go
99
star
13

respond

Idiomatic API responses for Go.
Go
84
star
14

resync

sync.Once with Reset()
Go
71
star
15

anno

Go package for text annotation.
Go
70
star
16

crunchcrunchcrunchstack

This repo is a starting point for a Go + Svelte.js + TailwindCSS project.
Go
64
star
17

golanguk

Source code for Golang UK talk - August 21st 2015, London.
Go
42
star
18

httperr

HTTP error wrapper
Go
35
star
19

articles

Source code repository for articles on https://medium.com/@matryer
Go
34
star
20

m

Get and Set using JavaScript notation
Go
31
star
21

pangaea

Powerful pre-processor for any kind of text file - powered by JavaScript
Go
29
star
22

version

Command line tool for versioning projects
Go
28
star
23

gae-records

Active Record like wrapper for Google App Engine Datasource in Go
Go
28
star
24

present

Presentations repository
Go
26
star
25

codeform

Easy Go code generation using templates
Go
25
star
26

filedb

File based storage and querying package
Go
23
star
27

mix

Go http.Handler that mixes many files into one request.
Go
13
star
28

captainslog

Logging package for Go
Go
12
star
29

persist

Persist loads and saves Go objects to files
Go
11
star
30

appengine

Example application for Google App Engine (As of November 2018)
Go
10
star
31

gocmds

Template for Go commands
Go
7
star
32

flower

In-process task flow management
Go
6
star
33

PathKit

Path tools for iOS and SpriteKit
Objective-C
6
star
34

oo

oo is the worlds simplest JavaScript OO implementation; for when you need classes and nothing else.
JavaScript
4
star
35

github-downloads

Tool (and Go package) for counting GitHub downloads
Go
4
star
36

str

String parsing package for Go. Converts strings to best guess value type.
Go
4
star
37

isvalid

Ultra simple data parsing and validation in Go
Go
3
star
38

codeform-templates

Repository of Codeform templates
Smarty
3
star
39

funkjs

A sweet selection of JavaScript funktion extensions
JavaScript
2
star
40

tailwindcss-github-theme

TailwindCSS GitHub theme for building GitHub styled apps using Tailwind.
2
star
41

rapid-api

Code for 3.5 hour workshop project at infoShare 2016
1
star
42

testing-in-go

Tutorial repo for Testing in Go talk
1
star
43

berlin-devfest-workshop

Code created during Berlin DevFest Workshop
Go
1
star
44

gimme

old location for github.com/matryer/drop
1
star