(t *testing.T)
| 225 | } |
| 226 | |
| 227 | func TestTreeCmd_CollectPortInfos(t *testing.T) { |
| 228 | // Cleanup. |
| 229 | dirs.RemoveAllForTest() |
| 230 | |
| 231 | // This test would require actual port configuration files |
| 232 | // For now, we test that the method signature is correct |
| 233 | treeCmd := treeCmd{} |
| 234 | celer := configs.NewCeler() |
| 235 | treeCmd.celer = celer |
| 236 | |
| 237 | parent := &portInfo{ |
| 238 | nameVersion: "test@1.0.0", |
| 239 | depth: 0, |
| 240 | devDep: false, |
| 241 | } |
| 242 | |
| 243 | // This will fail without proper setup, but we're testing the error handling |
| 244 | if err := treeCmd.collectPortInfos(parent, "nonexistent@1.0.0"); err == nil { |
| 245 | t.Error("Expected error for nonexistent package") |
| 246 | } |
| 247 | } |
| 248 | |
| 249 | func TestTreeCmd_Execute_InvalidTarget(t *testing.T) { |
| 250 | // Cleanup. |
nothing calls this directly
no test coverage detected