Skip to content

test(Common): add tests for Types/AI/AIAgentTaskStatusHelper#2574

Open
suvvvv wants to merge 1 commit into
OneUptime:masterfrom
suvvvv:test/ai-agent-task-status
Open

test(Common): add tests for Types/AI/AIAgentTaskStatusHelper#2574
suvvvv wants to merge 1 commit into
OneUptime:masterfrom
suvvvv:test/ai-agent-task-status

Conversation

@suvvvv

@suvvvv suvvvv commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

What

Adds unit tests for the AIAgentTaskStatusHelper class in Common/Types/AI/AIAgentTaskStatus.ts, which previously had no test coverage.

Covered:

  • getAllStatusProps — one entry per status, each with a non-empty title and description, and every enum value covered exactly once.
  • getTitle — returns the configured title for known statuses and an empty string for an unknown status.
  • getDescription — returns a non-empty description for a known status and an empty string for an unknown status.
  • isTerminalStatus — true for Completed / Error, false for Scheduled / InProgress.

Why

Improves test coverage for the Common/Types utilities (part of the broader test-coverage effort).

Testing

node node_modules/.bin/jest --runInBand ./Tests/Types/AI/AIAgentTaskStatus.test.ts

All 10 tests pass. The file is Prettier-clean.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@simlarsen

Copy link
Copy Markdown
Contributor

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants