aglinxinyuan opened a new issue, #6257:
URL: https://github.com/apache/texera/issues/6257

   ### Task Summary
   
   Add `logical-operator-port-serde.spec.ts` covering 
`parseLogicalOperatorPortID`, which parses a port-id string like `"input-0"` / 
`"output-3"` into `{ portNumber, portType }`.
   
   ## Background
   
   `frontend/src/app/common/util/logical-operator-port-serde.ts` exports one 
pure parser and has no test.
   
   ```ts
   export function parseLogicalOperatorPortID(
     portId: string
   ): { portNumber: number; portType: "input" | "output" } | undefined {
     const match = portId.match(/^(input|output)-(\d+)$/);
     if (!match) return undefined;
     return { portNumber: parseInt(match[2]), portType: match[1] as "input" | 
"output" };
   }
   ```
   
   ## Behavior to pin
   
   | Input | Result |
   | --- | --- |
   | `"input-0"` | `{ portNumber: 0, portType: "input" }` |
   | `"output-12"` | `{ portNumber: 12, portType: "output" }` |
   | `"foo-1"`, `"input-"`, `"input-1-2"`, `""` | `undefined` |
   
   Follow `size-formatter.util.spec.ts` in `common/util/` as the style template 
(plain `describe`/`it`/`expect`, run with `ng test`).
   
   ## Scope
   
   - New spec: 
`frontend/src/app/common/util/logical-operator-port-serde.spec.ts`.
   - No production-code changes.
   
   ### Task Type
   
   - [ ] Refactor / Cleanup
   - [ ] DevOps / Deployment / CI
   - [x] Testing / QA
   - [ ] Documentation
   - [ ] Performance
   - [ ] Other
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to