Skip to content

Commit

Permalink
tests
Browse files Browse the repository at this point in the history
  • Loading branch information
adamluzsi committed May 1, 2024
1 parent 77a9bcc commit 4aebe35
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions Spec_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1583,6 +1583,20 @@ func BenchmarkTestSpec_Benchmark(b *testing.B) {
assert.True(b, benchRan2)
b.Skip("done")
})
b.Run("skip", func(b *testing.B) {
var benchRan1 bool
s := testcase.NewSpec(b)
s.SkipBenchmark()
s.Context("1", func(s *testcase.Spec) {
s.Benchmark("A", func(t *testcase.T) {
benchRan1 = true
t.Skip()
})
})
s.Finish()
assert.False(b, benchRan1)
b.Skip("done")
})
b.Run("hook", func(b *testing.B) {
var hookRan, benchRan bool
s := testcase.NewSpec(b)
Expand Down

0 comments on commit 4aebe35

Please sign in to comment.