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

Function Test_AlphabeticalOrder

pkg/runtime/runtime_test.go:50–69  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

48}
49
50func Test_AlphabeticalOrder(t *testing.T) {
51 tests := []TestCase{
52 {Title: "bbb", Command: CommandUnderTest{Cmd: "exit 0;"}},
53 {Title: "aaa"},
54 {Title: "111"},
55 {Title: "_"},
56 }
57
58 got := []string{}
59 runtime := NewRuntime(&EventHandler{TestFinished: func(r TestResult) {
60 got = append(got, r.TestCase.Title)
61 }})
62
63 runtime.Start(tests)
64
65 assert.Equal(t, "111", got[0])
66 assert.Equal(t, "_", got[1])
67 assert.Equal(t, "aaa", got[2])
68 assert.Equal(t, "bbb", got[3])
69}
70
71func Test_RuntimeWithRetriesAndInterval(t *testing.T) {
72 s := getExampleTestCases()

Callers

nothing calls this directly

Calls 2

StartMethod · 0.95
NewRuntimeFunction · 0.85

Tested by

no test coverage detected