Skip to content
This repository has been archived by the owner on Aug 22, 2017. It is now read-only.
/ requirement Public archive

👻 skip some tests depending on the environment - deprecated use gotestyourself

License

Notifications You must be signed in to change notification settings

libkermit/requirement

Repository files navigation

👻 requirement

GoDoc Build Status Go Report Card License codecov

requirement provides support for requirement to be able to skip some tests depending on the environment. It is intended to work at lesat with the built-in testing framework. But any testing framework that defines a Skip(args ...interface{}) method can be used.

To write a test with a requirement, you need import this library and call it like the following

    func TestWithRequirement(t *testing.T) {
        requirement.Is(t, func() bool {
            return false
        })
    }

This will print requirement.go:51: requirement_test.go:56: unmatched requirement TestWithRequirement.func1

Provided requirement

A few requirement are also provided by this library. They are all based on the built-in libraries.

  • runtime with ArchitectureIs, OperatingSystemIs and GoVersionIs.

About

👻 skip some tests depending on the environment - deprecated use gotestyourself

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published