MCPcopy Create free account
hub / github.com/commander-cli/commander / Test_EventHandlerTestFinished

Function Test_EventHandlerTestFinished

pkg/output/cli_test.go:23–38  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

21}
22
23func Test_EventHandlerTestFinished(t *testing.T) {
24 var buf bytes.Buffer
25 writer := NewCliOutput(true)
26 writer.out = &buf
27 eh := writer.GetEventHandler()
28
29 testResults := createFakeTestResults()
30
31 for _, tr := range testResults {
32 eh.TestFinished(tr)
33 }
34
35 output := buf.String()
36 assert.Contains(t, output, "✗ [192.168.0.1] Failed test")
37 assert.Contains(t, output, "✓ [docker-host] Successful test")
38}
39
40func Test_EventHandlerTestSkipped(t *testing.T) {
41 var buf bytes.Buffer

Callers

nothing calls this directly

Calls 3

NewCliOutputFunction · 0.85
createFakeTestResultsFunction · 0.85
GetEventHandlerMethod · 0.80

Tested by

no test coverage detected