MCPcopy Create free account
hub / github.com/celer-pkg/celer / TestTreeCmd_Execute_InvalidTarget

Function TestTreeCmd_Execute_InvalidTarget

cmds/cmd_tree_test.go:249–266  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

247}
248
249func TestTreeCmd_Execute_InvalidTarget(t *testing.T) {
250 // Cleanup.
251 dirs.RemoveAllForTest()
252
253 treeCmd := treeCmd{}
254 celer := configs.NewCeler()
255 treeCmd.celer = celer
256
257 // Test with empty target
258 err := treeCmd.tree("")
259 if err == nil {
260 t.Error("Expected error for empty target")
261 }
262
263 if !strings.Contains(err.Error(), "empty") {
264 t.Errorf("Expected error message to contain 'empty', got: %v", err)
265 }
266}
267
268// Helper function to setup test environment
269func setupTestEnvironment(t *testing.T) {

Callers

nothing calls this directly

Calls 4

treeMethod · 0.95
RemoveAllForTestFunction · 0.92
NewCelerFunction · 0.92
ErrorMethod · 0.80

Tested by

no test coverage detected