-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathtypes.go
47 lines (40 loc) · 915 Bytes
/
types.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
package odize
import (
"testing"
)
// TestGroup - Group tests together, contains lifecycle context.
type TestGroup struct {
t *testing.T
beforeAll func()
beforeEach func()
afterEach func()
afterAll func()
groupTags []string
envTags []string
skipped bool
complete bool
registry []TestRegistryEntry
cache map[string]struct{}
errors ErrorList
isCIEnv bool
}
// TestFn - Test function
type TestFn = func(t *testing.T)
// TestRegistryEntry - Test name and function to execute on run
type TestRegistryEntry struct {
// Name of the test
name string
// Test function to execute with context
fn TestFn
options TestOpts
}
type TestFuncOpts = func(*TestOpts)
// TestOpts - Test options for granular control over each test
type TestOpts struct {
Only bool
Skip bool
}
// ErrorList - keep track of a number of errors
type ErrorList struct {
errors []error
}