LearnNewsExamplesServices
Frontmatter
titletest(util): cover Json extraction
authorBortlesboat
stateMerged
createdAt3:10 AM
updatedAt3:25 AM
closedAt3:25 AM
mergedAt3:25 AM
branchesdevtest/15117-json-util-coverage
urlhttps://github.com/neomjs/neo/pull/15120
contentTrust
projected
quarantined0
signals[]
Merged
Bortlesboat
Bortlesboat commented on 3:10 AM

Does this PR resolve an issue? (Required)

Closes #15117

What kind of change does this PR introduce? (check at least one)

  • Bugfix
  • Feature
  • Code style update
  • Refactor
  • Build-related changes
  • Other, please describe: focused unit coverage

Does this PR introduce a breaking change? (check one)

  • Yes
  • No

The PR fulfills this requirement:

  • It's submitted to the dev branch, not the main branch

Other information:

Adds a focused Neo.util.Json.extract() spec covering:

  • plain objects and arrays
  • json, javascript, js, and untagged Markdown fences
  • fenced JSON surrounded by unrelated prose
  • empty, whitespace-only, and malformed fail-closed inputs
  • nested objects, arrays, booleans, numbers, strings, and null

Verification:

  • focused Playwright unit spec: 5 passed
  • all staged-file lint gates passed
  • git diff --check passed

AI disclosure: Codex assisted with implementation and verification. I reviewed the complete diff and ran the checks reported above locally.

neo-opus-grace
neo-opus-grace commented on 3:15 AM

Two clean contributions in a row — welcome back, @Bortlesboat! 🎉 And you picked up the PR template this time; nicely done.

I ran this spec locally too: 5/5 pass. This one's even more thorough than your first — you covered Json.extract's signature feature (pulling JSON out of Markdown fences across json / javascript / js / untagged forms), the finds-a-block-inside-surrounding-text case, no-throw handling of malformed + empty input, and nested-value preservation. That's exactly the surface these extractors tend to regress on — really well chosen.

Two small housekeeping notes (nothing to change here):

  • I've assigned you to #15117 ✅ so the board reflects you're on it. As a general habit for good-first-issues, a quick comment to claim one before starting helps avoid two people grabbing the same ticket — but honestly, your just-go-do-it initiative is exactly the energy we love, so no complaints here.
  • Same friendly Resolves #N over Closes #N note as on #15119 — fully non-blocking, just a one-word habit for next time.

CI auto-ran this time (the first-PR approval gate is behind you now) — mostly green already, and the unit job runs your spec, which I've verified locally. Verified and ready from my side; cc @tobiu for the merge.

Keep 'em coming — this is a genuinely strong start. 🖖 — Grace


neo-opus-grace
neo-opus-grace APPROVED reviewed on 3:20 AM

Approved ✅ — verified the spec locally (5/5 pass); full review in the comment above. Two strong contributions in a row — welcome aboard! 🖖 — Grace


neo-opus-grace
neo-opus-grace APPROVED reviewed on 3:24 AM

PR Micro-Review

Class: micro — a single, purely-additive unit-test file (−0 production change).

Verdict: APPROVED ✅

Glance: Verified locally — 5/5 pass against the current util. Idiomatic (follows Neo's unit-test conventions), well-chosen edge cases, zero risk to existing behavior. Full welcoming review + onboarding notes are in the PR comment above. Welcome aboard, @Bortlesboat! 🖖 — Grace