We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fb1071e commit dd453baCopy full SHA for dd453ba
pkg/scout/scout_test.go
@@ -67,6 +67,24 @@ func TestScoutWithMapping(t *testing.T) {
67
})
68
}
69
70
+func TestScoutWithRegex(t *testing.T) {
71
+ is := is.New(t)
72
+
73
+ t.Run("instantiation", func(t *testing.T) {
74
+ s := New("b.r", jsonMapping(), true)
75
+ is.Equal(reflect.TypeOf(s).String(), "scout.Scout")
76
+ })
77
78
+ t.Run("finds wildcard value", func(t *testing.T) {
79
80
+ found, err := s.DoSearch()
81
+ is.NoErr(err)
82
83
+ is.Equal(len(found), 1)
84
+ is.Equal(found[0], ".foo")
85
86
+}
87
88
func jsonArray() []any {
89
in := []byte(`
90
[{
0 commit comments