-
Notifications
You must be signed in to change notification settings - Fork 0
/
nodecheck_test.go
28 lines (22 loc) · 711 Bytes
/
nodecheck_test.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
package nodecheck_test
import (
"testing"
"github.com/gqlgo/gqlanalysis/analysistest"
"github.com/gqlgo/nodecheck"
)
func Test(t *testing.T) {
testdata := analysistest.TestData(t)
analysistest.Run(t, testdata, nodecheck.Analyzer(""), "a")
}
func TestWithSingleExclusion(t *testing.T) {
testdata := analysistest.TestData(t)
analysistest.Run(t, testdata, nodecheck.Analyzer("Community"), "b")
}
func TestWithMultipleExclusion(t *testing.T) {
testdata := analysistest.TestData(t)
analysistest.Run(t, testdata, nodecheck.Analyzer("Community,Item"), "c")
}
func TestWithRegex(t *testing.T) {
testdata := analysistest.TestData(t)
analysistest.Run(t, testdata, nodecheck.Analyzer(".+Payload"), "d")
}