@@ -35,7 +35,7 @@ var _ = Describe("ListPackageExportsTool", func() {
3535 resJSON , err := tool .Execute (ctx , map [string ]interface {}{"file_path" : "main.go" })
3636 Expect (err ).NotTo (HaveOccurred ())
3737 var resp tools.ToolResponse
38- json .Unmarshal ([]byte (resJSON ), & resp )
38+ Expect ( json .Unmarshal ([]byte (resJSON ), & resp )). NotTo ( HaveOccurred () )
3939 Expect (resp .Status ).To (Equal ("error" ))
4040 Expect (resp .Error ).To (ContainSubstring ("package parameter is required" ))
4141 })
@@ -71,7 +71,7 @@ var _ = Describe("ListPackageExportsTool", func() {
7171 Expect (err ).NotTo (HaveOccurred ())
7272
7373 var resp tools.ToolResponse
74- json .Unmarshal ([]byte (resJSON ), & resp )
74+ Expect ( json .Unmarshal ([]byte (resJSON ), & resp )). NotTo ( HaveOccurred () )
7575 if resp .Status != "success" {
7676 GinkgoWriter .Printf ("ListPackageExports Error: %s\n " , resp .Error )
7777 }
@@ -95,7 +95,7 @@ var _ = Describe("ListPackageExportsTool", func() {
9595 return []storage.SearchResult {}, nil
9696 }
9797
98- tool .Execute (ctx , map [string ]interface {}{"package" : "mypkg" , "file_path" : "main.go" })
98+ _ , _ = tool .Execute (ctx , map [string ]interface {}{"package" : "mypkg" , "file_path" : "main.go" })
9999
100100 Expect (capturedFilter ).NotTo (BeNil ())
101101 Expect (capturedFilter ["package" ]).To (Equal ("mypkg" ))
@@ -119,7 +119,7 @@ var _ = Describe("ListPackageExportsTool", func() {
119119 resJSON , err := tool .Execute (ctx , map [string ]interface {}{"package" : "mypkg" , "file_path" : "main.go" })
120120 Expect (err ).NotTo (HaveOccurred ())
121121 var resp tools.ToolResponse
122- json .Unmarshal ([]byte (resJSON ), & resp )
122+ Expect ( json .Unmarshal ([]byte (resJSON ), & resp )). NotTo ( HaveOccurred () )
123123 Expect (resp .Status ).To (Equal ("success" ))
124124 data := resp .Data .(map [string ]interface {})
125125 funcs := data ["function" ].([]interface {})
@@ -142,7 +142,7 @@ var _ = Describe("ListPackageExportsTool", func() {
142142 resJSON , err := tool .Execute (ctx , map [string ]interface {}{"package" : "mypkg" , "file_path" : "main.go" })
143143 Expect (err ).NotTo (HaveOccurred ())
144144 var resp tools.ToolResponse
145- json .Unmarshal ([]byte (resJSON ), & resp )
145+ Expect ( json .Unmarshal ([]byte (resJSON ), & resp )). NotTo ( HaveOccurred () )
146146 Expect (resp .Status ).To (Equal ("success" ))
147147 Expect (resp .Data ).To (BeNil (), "internalHelper should be excluded by isExported check" )
148148 })
@@ -168,7 +168,7 @@ var _ = Describe("ListPackageExportsTool", func() {
168168 resJSON , err := tool .Execute (ctx , map [string ]interface {}{"package" : "mypkg" , "file_path" : "main.go" })
169169 Expect (err ).NotTo (HaveOccurred ())
170170 var resp tools.ToolResponse
171- json .Unmarshal ([]byte (resJSON ), & resp )
171+ Expect ( json .Unmarshal ([]byte (resJSON ), & resp )). NotTo ( HaveOccurred () )
172172 Expect (resp .Status ).To (Equal ("success" ))
173173 Expect (resp .Message ).To (ContainSubstring ("**Relations:** 3" ), "Output should display RelationsCount when > 0" )
174174 })
0 commit comments