Frontmatter
| id | 15118 |
| title | Add unit coverage for Neo.util.String |
| state | Closed |
| labels | enhancementhelp wantedgood first issuecontributor-experienceaitesting |
| assignees | Bortlesboat |
| createdAt | 2:10 AM |
| updatedAt | 3:20 AM |
| githubUrl | https://github.com/neomjs/neo/issues/15118 |
| author | neo-gpt-emmy |
| commentsCount | 2 |
| parentIssue | null |
| subIssues | [] |
| subIssuesCompleted | 0 |
| subIssuesTotal | 0 |
| contentTrust | |
| projected | |
| quarantined | 0 |
| signals | [] |
| blockedBy | [] |
| blocking | [] |
| closedAt | 3:20 AM |
Add unit coverage for Neo.util.String

I'd like to take this as a first-time Neo.mjs contributor. I’ll keep the change test-only, follow the existing util-spec import/setup pattern, cover every contract in the issue ledger, and run both the focused spec and complete unit suite before opening a PR against dev. I’m using OpenAI Codex for implementation support and will review and verify the resulting diff.
- 2026-07-13T00:40:54Z @neo-gpt-emmy assigned to @Bortlesboat
@neo-gpt-emmy - 2026-07-13T00:40:55Z
Welcome, @Bortlesboat — assigned. Your proposed scope matches the ticket well.
I strongly recommend starting with Neo's unit-test agent skill and following its linked workflow before writing the spec. It captures Neo's non-standard Playwright unit-test architecture, required Neo.mjs + core/_export.mjs imports, shared-worker namespace cautions, and the exact focused/full-suite commands. The companion Unit Testing guide provides the underlying single-thread simulation model.
For this ticket, the focused verification is:
npm run test-unit -- test/playwright/unit/util/String.spec.mjs
Then run npm run test-unit before opening the PR against dev. Please do not use the default unconfigured npx playwright test command. If current behavior and the ticket contract appear to disagree, ask here before changing src/util/String.mjs; this lane is intentionally test-only.
Glad to have you contributing to Neo.
Context
GitHub surfaces approachable repository work through the
good first issuelabel. Neo currently has no open issue carrying that label, so this ticket creates a deliberately small, self-contained entry point outside the v13.2 release work.Problem
Neo.util.Stringcontains small, deterministic helpers for entity mapping, escaping, unescaping, and first-letter normalization, but it has no focused unit spec. The missing coverage was already identified as a standalone follow-up in #7441.Architectural reality
src/util/String.mjstest/playwright/unit/util/String.spec.mjstest/playwright/unit/util/Env.spec.mjsandRectangle.spec.mjsContract ledger
escapeHtml()charPatternwith their configured entitiesunescapeHtml()escapeHtml()andunescapeHtml()return it unchangeduncapitalize()Acceptance criteria
test/playwright/unit/util/String.spec.mjsusing the existing util-spec setup/import pattern.StringUtil.charPattern.StringUtil.entityPattern.getEntityFromChar()andgetCharFromEntity()for known and unknown values.escapeHtml()andunescapeHtml().uncapitalize()for an uppercase-leading string, an already-lowercase string, and empty/falsy input.src/util/String.mjs.npm run test-unit -- test/playwright/unit/util/String.spec.mjsnpm run test-unitOut of scope
Neo.util.StringcharPatternor changing current escaping semanticsAvoided traps
charEntityMapmust be selected bycharPattern; this ticket covers the current public behavior rather than redesigning it.npx playwright test; Neo requires its custom unit configuration.src/Neo.mjsandsrc/core/_export.mjsas the sibling specs do.Prior art and duplicate sweep
Neo.util.Stringcoverage as a separate unit-test ticket.Decision-record impact
None. This ticket pins existing public utility contracts and introduces no architectural decision.
Origin Session ID:
f95e01ff-ba36-409a-98af-573263fab247