-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain_test.go
45 lines (36 loc) · 926 Bytes
/
main_test.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
package main
import (
"github.com/playlyfe/cucumber/core"
"github.com/playlyfe/cucumber/formatter"
"testing"
)
var cucumber *core.Cucumber
func TestMain(m *testing.M) {
cucumber = NewCucumber()
cucumber.AddOuputFormatter(formatter.NewPrettyFormatter())
Given := cucumber.Step()
//And := Given
//When := Given
cucumber.AddTransform("date", &core.Transform{
CaptureRegexp: "\\d+-\\d+-\\d+",
Transformer: func(value string) (interface{}, error) {
return value, nil
},
})
Given("a scenario with:", func(world interface{}, _ string) error {
// Write your step definition here
//println(text)
return nil
})
Given("the following feature:", func(world interface{}, _ string) error {
// Write your step definition here
//println(text)
return nil
})
m.Run()
}
func TestCucumberTCKFeatures(t *testing.T) {
cucumber.Execute(&core.ExecuteParams{
FeaturesPath: "features/core.feature",
})
}