Skip to content

[repo-assist] test: cover jsLikeAnalyzer computed object-property-key fallback - #537

Draft
github-actions[bot] wants to merge 1 commit into
mainfrom
repo-assist/test-jslike-computed-key-20260812-a84bc793dd6b204f
Draft

[repo-assist] test: cover jsLikeAnalyzer computed object-property-key fallback#537
github-actions[bot] wants to merge 1 commit into
mainfrom
repo-assist/test-jslike-computed-key-20260812-a84bc793dd6b204f

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

🤖 This pull request was created by Repo Assist, an automated AI assistant.

Summary

Adds a unit test covering getFunctionName in jsLikeAnalyzer.ts for the case where an anonymous function_expression is assigned to a computed object property key (e.g. { [computedKey]: function() {} }). Previously this branch (line 228: keyNode?.type === "property_identifier" || keyNode?.type === "identifier") was exercised only by the "true" side (bare identifier keys); a computed key correctly falls through to (anonymous), but that fallback path was untested.

Rationale

  • Genuine, low-risk coverage gap identified via npm run test:coverage (branch coverage for jsLikeAnalyzer.ts was 98.33%, missing branch on line 228).
  • No production code changes — test-only addition, zero behavioral risk.
  • Confirms the existing fallback behavior (computed keys can't be statically resolved to a name, so (anonymous) is correct) is locked in by a regression test.

Test Status

npm run compile   ✅ (0 errors)
npm run lint      ✅ (0 warnings)
npm run test:unit ✅ 218 passing, 0 failing

Coverage improved: jsLikeAnalyzer.ts branch coverage 98.33% → 99.17% (line 228 fully covered; remaining gap at line 465 is a pre-existing, likely-defensive fallback in getOperator, left untouched per minimal-scope guidance).

Trade-offs

None — this is a pure test addition with no behavior change.

Warning

Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • releaseassets.githubusercontent.com

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "releaseassets.githubusercontent.com"

See Network Configuration for more information.

Generated by 🌈 Repo Assist, see workflow run. Learn more.
Comment /repo-assist to run again

Add this agentic workflow to your repo

To install this agentic workflow, run

gh aw add githubnext/agentics/workflows/repo-assist.md@42c2ab5b4e4c9273534c39259b2e0df7f20f07e9

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants