Skip to content

Latest commit

 

History

History
59 lines (42 loc) · 1.28 KB

README.md

File metadata and controls

59 lines (42 loc) · 1.28 KB

test

Go Report Card

test is a simple and flexible testing library for Go, designed to work seamlessly with the standard testing package provided by Go. It offers additional functionality with color-coded output and columnized messages for easier reading of test results.

Installation

Use the go get command to add test to your project:

go get github.com/muxit-studio/test

Usage

This package provides two main components - assert and require.

assert

import (
	"testing"
	"github.com/muxit-studio/test/assert"
)

func TestSomething(t *testing.T) {
	result := someFunction()
	expected := "expected result"
	assert.Equal(t, result, expected, "Result should match expected value")
}

require

import (
	"testing"
	"github.com/muxit-studio/test/require"
)

func TestSomethingElse(t *testing.T) {
	result := someOtherFunction()
	expected := "expected result"
	require.Equal(t, result, expected, "Result should match expected value")
}

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the MIT License - see the LICENSE file for details.