Custom reporter for Ginkgo testing framework.
Just add github.com/Kalimaha/ginkgo/reporter
to the imports:
package calculator
import (
"github.com/Kalimaha/ginkgo/reporter"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
"testing"
)
func TestReducers(t *testing.T) {
RegisterFailHandler(Fail)
RunSpecsWithCustomReporters(t, "Calculator", []Reporter{reporter.New()})
}
The calculator_test.go
included in this repo will produce the following output:
Calculator
Divide
divides two numbers, A and B ✔️
but when B is 0
returns an error ✔️
Sum
sums two numbers ✔️
PASS