Update formatter for more coverage
@@ -336,6 +336,33 @@ func TestFileSummarizeCsv(t *testing.T) {
}
}
+func TestFileSummarizeDefault(t *testing.T) {
+ inputChan := make(chan *FileJob, 1000)
+ inputChan <- &FileJob{
+ Language: "Go",
+ Filename: "bbbb.go",
+ Extension: "go",
+ Location: "./",
+ Bytes: 1000,
+ Lines: 1000,
+ Code: 1000,
+ Comment: 1000,
+ Blank: 1000,
+ Complexity: 1000,
+ WeightedComplexity: 1000,
+ Binary: false,
+ }
+
+ close(inputChan)
+ Format = ""
+ More = false
+ res := fileSummarize(inputChan)
+
+ if !strings.Contains(res, `Estimated Cost to Develop`) {
+ t.Error("Expected summary return", res)
+ }
+}
+
// When using columise ~28726 ns/op
// When using optimised ~14293 ns/op
func BenchmarkFileSummerize(b *testing.B) {
