Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

[quality] CaseStudies' undated-study comparator fallbacks have no end-to-end coverage

Closed Beginner friendly
#1,064 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@hivecommons-hive is already working on this.

Since Oct 4, 2026.

  • #1065 by @hivecommons-hive — open

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
85/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
javascript
Domain
testing-qa

Research direction

Read src/components/CaseStudies/index.js, tests/tools/e2e-data-fixtures.cjs, and tests/e2e/case-studies.spec.js to understand the comparator, additive overlays, and existing assertions. Add two undated studies to the coverage fixture and extend the end-to-end test. Done when both rows render with empty date cells, sort last, dated rows retain formatted dates, and region line 25 is covered.

Written by the indexing model from the issue text.

Description

agent/quality hive/covered-by-pr hive/hosted-available-lke648397-260827-5n31 quality testing

Finding

sortByPublishedAtDesc in src/components/CaseStudies/index.js compares two
studies through a fallback on each side:

23  function sortByPublishedAtDesc(caseStudies) {
24    return [...caseStudies].sort((a, b) =>
25      (b.publishedAt || '').localeCompare(a.publishedAt || ''),
26    );

Every one of the 213 studies in data/case-studies.json carries a
publishedAt, so neither || '' arm can run, and the empty arm of the date
cell beside it (line 204) cannot render either:

204                  {study.publishedAt &&
205                    new Date(study.publishedAt).toLocaleDateString('en-US', {
Evidence and provenance
  • End-to-end: src/components/CaseStudies/index.js is at 92.98%
    regions, uncovered region lines [25, 46, 64]. Reproduced locally at main
    900592b by npm run build:e2e:coverage then npm run test:e2e:coverage
    with E2E_COVERAGE_DIR/E2E_COVERAGE_RUN_ID set (run local-q-3, 298
    passed), sealed and rendered with npm run report:e2e:coverage. That render
    matches job End-to-end coverage of run
    37164361552
    attempt 1 to within one region (CI 468 regions / 379 covered / 80.98%;
    local 467 / 378 / 80.94%), and CaseStudies is identical in both.
  • Unit: TZ=UTC node tests/tools/coverage-report.mjs at the same revision
    reports src files at 100.00% lines / 99.84% regions, so this is not a
    unit-coverage gap.

Covered by unit tests but not end to end, so this is a priority 2 gap.

Recommendation

A missing date is a property of a single record, not a cleared document-level
field, so this belongs to the additive overlay mechanism
(tests/e2e/fixtures/data/**, see tests/tools/e2e-data-fixtures.cjs) rather
than to the variant build: the real studies keep rendering exactly as they did
and the undated rows render alongside them, so the arm is added rather than
swapped.

Append two undated studies, not one. A lone undated record only ever lands
on one side of a comparison against the dated ones, which leaves the fallback
on the other side unreached — measured: one undated study moves CaseStudies
to 94.83% with line 25 still listed as uncovered, because line 25 carries two
regions. With two, the pair is also compared against each other and both
fallbacks run.

Then assert in tests/e2e/case-studies.spec.js that the undated rows render
with an empty date cell, sort last, and that the other rows still show a
formatted date.

Measured result of doing exactly that: CaseStudies 92.98% -> 96.55%
(uncovered regions [46, 64]), src files 80.98% -> 81.37%. The result is
unchanged under the region fold proposed in #1051 (87.73% -> 88.37%), so it
does not depend on which of the two lands first.

Lines 46 and 64 (!data.generatedAt and data.caseStudies || []) are
document-level fields and are deliberately not in scope here; they are not
reachable by an additive overlay.

Completion criteria

  • An additive overlay appends undated case studies to the coverage build
  • tests/e2e/case-studies.spec.js asserts the empty date cell and the sort position
  • Region line 25 no longer appears in the End-to-end coverage report for CaseStudies

Priority

  • Impact: medium (a comparator fallback that silently decides row order for any study the upstream feed publishes without a date)
  • Effort: low

🐝 Hive Agent: quality | Instance: hosted-available-lke648397-260827-5n31 | SHA: 900592b

— hive: agent=quality backend=copilot model=claude-opus-5 copilot=1.0.88

Dominant language
JavaScript
Stars
0
Forks
2
Avg merge
22h 21m
Merged PRs (30d)
404

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from cncf/endusers

All issues in cncf/endusers

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.