MCPcopy Create free account
hub / github.com/driangle/taskmd / TestTaskToSnapshot_CoreOnly

Function TestTaskToSnapshot_CoreOnly

apps/cli/internal/cli/snapshot_test.go:301–331  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

299}
300
301func TestTaskToSnapshot_CoreOnly(t *testing.T) {
302 task := &model.Task{
303 ID: "001",
304 Title: "Test",
305 Status: model.StatusPending,
306 Priority: model.PriorityHigh,
307 Effort: model.EffortSmall,
308 Group: "backend",
309 FilePath: "tasks/001.md",
310 }
311 taskMap := map[string]*model.Task{"001": task}
312
313 snapshot := taskToSnapshot(task, true, false, nil, nil, nil, taskMap)
314
315 if snapshot.ID != "001" {
316 t.Errorf("ID = %q, want %q", snapshot.ID, "001")
317 }
318 if snapshot.Title != "Test" {
319 t.Errorf("Title = %q, want %q", snapshot.Title, "Test")
320 }
321 // Core-only: status, priority, effort, group, filepath should be omitted
322 if snapshot.Status != "" {
323 t.Errorf("Status = %q, want empty (core-only mode)", snapshot.Status)
324 }
325 if snapshot.Priority != "" {
326 t.Errorf("Priority = %q, want empty (core-only mode)", snapshot.Priority)
327 }
328 if snapshot.FilePath != "" {
329 t.Errorf("FilePath = %q, want empty (core-only mode)", snapshot.FilePath)
330 }
331}
332
333func TestTaskToSnapshot_WithDerived(t *testing.T) {
334 tasks := []*model.Task{

Callers

nothing calls this directly

Calls 1

taskToSnapshotFunction · 0.85

Tested by

no test coverage detected