Past 3 hrs I'm not able to understand why 'go' is considering my test file to be empty.
here how my structure looks like
events
├── button_not_shown_event.go
├── events_test
│ └── button_not_shown_event_test.go
And here how my button_not_shown_event_test.go
look like
package events_test
import (
"fmt"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
var _ = Describe("ButtonNotShownEvent", func() {
BeforeEach(func() {
Expect(false).To(BeTrue())
})
Context("ButtonNotShownEvent.GET()", func() {
It("should not return a JSONify string", func() {
Expect(true).To(BeFalse())
})
})
})
Notice I have specifically written a test so that it will fail.
But every time I run the go test
go test ./app/events/events_test/button_not_shown_event_test.go -v
testing: warning: no tests to run
PASS
ok command-line-arguments 1.027s
So clearly there is definitely something I'm missing over here.
Any clue?
You have a few issues.
(t *testing.T)
.Additionally, after a lot of comments by several people. You likely need to read the Ginkgo docs, to be sure you are following their process properly to get your tests setup properly.