Help us shape the future of Go! Take the 2026 Go Developer Survey

go-testutils

module
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 1, 2025 License: MIT

README

Go-testutils

Go-testutils is a collection of utilities for testing. Missing features in os.*, "github.com/stretchr/testify/assert".

fs package

See it in action:

package main

import (
	testfsutils "github.com/knaka/go-testutils/fs"
)

func TestSomething(t *testing.T) {
	err := testfsutils.CopyDir("dest/dir", "src/dir")
}

fsassert package

See it in action:

package main

import (
	"github.com/knaka/go-testutils/fsassert"
)

func TestSomething(t *testing.T) {
	fsassert.FilesAreEqual(t, "testdata/expected.txt", "testdata/actual.txt")
	fsassert.DirsAreEqual(t, "testdata/expected", "testdata/actual"
}

Directories

Path Synopsis
Package fs is a set of file utilities for testing.
Package fs is a set of file utilities for testing.
Package fsassert is a set of assertions for filesystems.
Package fsassert is a set of assertions for filesystems.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL