Add tests for ginkgo test files

This commit is contained in:
Sauyon Lee
2020-04-13 21:29:36 -07:00
parent 385603a7a1
commit a3ad54e8b9
7 changed files with 80 additions and 0 deletions

View File

@@ -1,3 +1,4 @@
| ginkgo.go:0:0:0:0 | ginkgo.go | test |
| hello2.go:0:0:0:0 | hello2.go | generated |
| hello.go:0:0:0:0 | hello.go | generated |
| httptest.go:0:0:0:0 | httptest.go | test |

View File

@@ -1,3 +1,4 @@
| ginkgo.go:13:1:16:1 | function declaration |
| test1.go:5:1:5:26 | function declaration |
| test1.go:7:1:7:27 | function declaration |
| test1.go:15:1:15:31 | function declaration |

View File

@@ -0,0 +1,16 @@
package main
//go:generate depstubber -vendor github.com/onsi/ginkgo "" Fail,RunSpecs
//go:generate depstubber -vendor github.com/onsi/gomega "" RegisterFailHandler
import (
"testing"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
func TestClassifyFiles(t *testing.T) {
RegisterFailHandler(Fail)
RunSpecs(t, "ClassifyFiles Suite")
}

View File

@@ -0,0 +1,12 @@
module filters.ClassifyFiles
go 1.14
require (
github.com/github/depstubber v0.0.0-20200414033246-a63ca77a1581 // indirect
github.com/onsi/ginkgo v1.12.0
github.com/onsi/gomega v1.9.0
golang.org/x/net v0.0.0-20200226121028-0de0cce0169b // indirect
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e // indirect
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 // indirect
)

View File

@@ -0,0 +1,20 @@
// Code generated by depstubber. DO NOT EDIT.
// This is a simple stub for github.com/onsi/ginkgo, strictly for use in testing.
// See the LICENSE file for information about the licensing of the original library.
// Source: github.com/onsi/ginkgo (exports: ; functions: Fail,RunSpecs)
// Package ginkgo is a stub of github.com/onsi/ginkgo, generated by depstubber.
package ginkgo
import ()
func Fail(_ string, _ ...int) {}
type GinkgoTestingT interface {
Fail()
}
func RunSpecs(_ GinkgoTestingT, _ string) bool {
return false
}

View File

@@ -0,0 +1,12 @@
// Code generated by depstubber. DO NOT EDIT.
// This is a simple stub for github.com/onsi/gomega, strictly for use in testing.
// See the LICENSE file for information about the licensing of the original library.
// Source: github.com/onsi/gomega (exports: ; functions: RegisterFailHandler)
// Package gomega is a stub of github.com/onsi/gomega, generated by depstubber.
package gomega
import ()
func RegisterFailHandler(_ interface{}) {}

View File

@@ -0,0 +1,18 @@
# github.com/github/depstubber v0.0.0-20200414033246-a63ca77a1581
## explicit
github.com/github/depstubber
# github.com/onsi/ginkgo v1.12.0
## explicit
github.com/onsi/ginkgo
# github.com/onsi/gomega v1.9.0
## explicit
github.com/onsi/gomega
# golang.org/x/net v0.0.0-20200226121028-0de0cce0169b
## explicit
golang.org/x/net
# golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e
## explicit
golang.org/x/sync
# golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543
## explicit
golang.org/x/xerrors