← Back to task

Commit 9ac32389

commit 9ac32389934012a7d33339ea81ae6a6c7c34b2c0
Author: Ben Sima <ben@bensima.com>
Date:   Wed Nov 26 13:25:07 2025

    Port task commands to jr task
    
    All tests pass. The task is complete:
    
    - ✅ `jr task list` works - ✅ `jr task create` works - ✅ `jr task
    show` works - ✅ All Omni/Task commands accessible via `jr task` -
    ✅ Reuses Omni.Task logic - ✅ Added tests for task command parsing -
    ✅ `bild --test Omni/Jr.hs` passes
    
    Task-Id: t-1o2egbj8o0n.2

diff --git a/Omni/Jr.hs b/Omni/Jr.hs
index 8636e54f..8200be5c 100644
--- a/Omni/Jr.hs
+++ b/Omni/Jr.hs
@@ -398,6 +398,18 @@ test =
   Test.group
     "Omni.Jr"
     [ Test.unit "can run tests" <| True Test.@?= True,
+      Test.unit "can parse task command" <| do
+        let result = Docopt.parseArgs help ["task"]
+        case result of
+          Left err -> Test.assertFailure <| "Failed to parse 'task': " <> show err
+          Right args -> args `Cli.has` Cli.command "task" Test.@?= True,
+      Test.unit "can parse task command with args" <| do
+        let result = Docopt.parseArgs help ["task", "list", "--json"]
+        case result of
+          Left err -> Test.assertFailure <| "Failed to parse 'task list --json': " <> show err
+          Right args -> do
+            args `Cli.has` Cli.command "task" Test.@?= True
+            Cli.getAllArgs args (Cli.argument "args") Test.@?= ["list", "--json"],
       Test.unit "can parse work command" <| do
         let result = Docopt.parseArgs help ["work"]
         case result of