testutils

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2024 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CopyToTestDirectory

func CopyToTestDirectory(t *testing.T, filePath string) string

CopyToTestDirectory copies files or directories from the provided filePath (relative to ./tests/contracts/) to an ephemeral directory used for unit tests.

func ExecuteInDirectory

func ExecuteInDirectory(t *testing.T, testPath string, method func())

ExecuteInDirectory executes the given method in a given test directory. It changes the current working directory to the directory specified, runs the provided method, then restores the working directory. This wraps tests so any file artifacts generated do not end up in the codebase directories.

Types

This section is empty.

Jump to

Keyboard shortcuts

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