This question already has an answer here:
When writing tests in Go, how do I mark a test as inconclusive, i.e. as existent, but neither succeeding or failing, e.g. because it does not yet have an implementation?
I'm coming from a Node.js background, and e.g. in Mocha (a test-runner for Node.js) you can define a test without an implementation, and then Mocha marks this test as pending
.
How can you do this with Go?
(If it makes any difference, I am using gocheck on top of go test
.)
</div>
I'm pretty sure this is not what you want but I'd use skip for this
func TestTimeConsuming(t *testing.T) {
if testing.Short() {
t.Skip("skipping test in short mode.")
}
...
}
This is likely controversial but I don't think tests should be inconclusive. They should Pass/Fail or Skip.