为什么我的考试没有失败?

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.

  1. You aren't importing the testing package. This should be in the bootstrap file generated by Ginkgo.
  2. The bootstrap file should also include as a parameter the testing.T function. e.g. (t *testing.T).
  3. It looks like you skipped a step or two in the Ginkgo process, resulting in a prior dependency not existing. e.g. the bootstrap/stub.

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.