0

How to write test case in multiple test file using ginkgo?

a_suite_test.go file:

func TestA(t *testing.T) {
    RegisterFailHandler(Fail)
    RunSpecs(t, "A Suite")
}

a_test.go:

var _ = Describe("A", func() {
    Context("A", func() {
        It("A", func() {
            Expect(1).To(Equal(1))
        })
    })
})

I run ginkgo, but error is throwed:

Failed to compile A:

go build xxx: no non-test Go files in xxx

Can I write test case in other test files rather than writing in suite test file ?

1 Answer 1

0

run

go test ./...

from root of your project, it will run all your tests. With ginkgo you need this suite file, but go test command will grab it and run it.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.