Skip to content

test: add node:test coverage for pitch naming and chart-event cursoring - #11

Merged
OmikronApex merged 1 commit into
mainfrom
chore/add-basic-tests
Jul 8, 2026
Merged

OmikronApex merged 1 commit into
mainfrom
chore/add-basic-tests

Conversation

@OmikronApex

Copy link
Copy Markdown
Contributor

Nineteenth repo from the org test-coverage audit. The module.exports hook sits right before the bootstrap block (window/document event listener registration + ensureButton()), after every helper function declaration.

11 tests:

  • stringFretToName: standard 6-string guitar open strings, tuning-offset + capo math, bass-arrangement detection (4-string), 7-string guitar / 5-string bass via tuning-array length, out-of-range string index → ?
  • rebuildChartEvents: merges notes + chords into one time-sorted list, drops muted notes and muted chord members (and chords left with zero members), tolerates a missing highway global
  • resetCursor: binary-searches to the first event at/after the current audio time
  • findNextEvent: RAF-hitch tolerance window (a big time jump doesn't silently skip the very next event), returns null once the cursor runs past the end of the chart

🤖 Generated with Claude Code

Node-only module.exports hook right before the bootstrap block
(event listener registration + ensureButton()). Covers
stringFretToName across 6/7-string guitar and 4/5-string bass
tunings with capo/offset, rebuildChartEvents merging+sorting+
muted-note filtering, resetCursor binary search, and findNextEvent's
RAF-hitch tolerance window.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jul 8, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@OmikronApex, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 1 minute

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: dfeff670-5edc-4890-8637-e8a285dadd7e

📥 Commits

Reviewing files that changed from the base of the PR and between 2013f79 and 8120cab.

📒 Files selected for processing (2)
  • screen.js
  • tests/screen.test.js
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/add-basic-tests

Comment @coderabbitai help to get the list of available commands.

@OmikronApex
OmikronApex merged commit e32d24c into main Jul 8, 2026
3 checks passed
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.

1 participant