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

Function Test_TestCommand_WithConfig

pkg/app/test_command_test.go:59–72  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

57}
58
59func Test_TestCommand_WithConfig(t *testing.T) {
60 testSuite := "testdata/overwrite.yaml"
61 if runtime.GOOS == "windows" {
62 testSuite = "testdata/overwrite_windows.yaml"
63 }
64
65 out := captureOutput(func() {
66 context := TestCommandContext{Config: "testdata/default.yaml"}
67 TestCommand(testSuite, context)
68 })
69
70 assert.Contains(t, out, "✓ [local] key from overwrite")
71 assert.Contains(t, out, "✓ [local] key does not overwrite")
72}
73
74func Test_TestCommand_FailingSuite(t *testing.T) {
75 err := TestCommand("testdata/test_fail.yaml", TestCommandContext{})

Callers

nothing calls this directly

Calls 2

captureOutputFunction · 0.85
TestCommandFunction · 0.85

Tested by

no test coverage detected