Skip to content

test: add unit tests for getOperationId#6825

Merged
TIANQIAN1238 merged 1 commit into
mainfrom
test/get-operation-id
Jul 6, 2026
Merged

test: add unit tests for getOperationId#6825
TIANQIAN1238 merged 1 commit into
mainfrom
test/get-operation-id

Conversation

@Jeniter

@Jeniter Jeniter commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

What

Adds a small, focused unit-test file for the getOperationId helper in app/utils.ts, which was previously uncovered.

Covered behaviour:

  • prefers an explicit operationId when provided
  • derives an id from method + path when it is missing
  • uppercases the method and replaces every slash in the path
  • the produced id matches the allowed pattern ^[a-zA-Z0-9_-]+$

Notes

  • Additive only — no existing files are modified or removed.
  • yarn test:ci passes locally.

Part of a series of small QA-only PRs adding unit coverage for pure helpers.

Adds coverage for the previously untested getOperationId helper in
app/utils.ts (explicit operationId, method+path derivation, slash
replacement, and the allowed id pattern). Purely additive — no existing
files are changed.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@TIANQIAN1238
TIANQIAN1238 merged commit 2495851 into main Jul 6, 2026
1 check failed
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