Skip to content

test: cover GroupLinkStatus and PeopleFreshness rendered output - #482

Merged
mrbobbytables merged 1 commit into
mainfrom
quality/test-freshness-components
Sep 23, 2026
Merged

mrbobbytables merged 1 commit into
mainfrom
quality/test-freshness-components

Conversation

@hivecommons-hive

Copy link
Copy Markdown
Contributor

Test Improvement

Adds unit coverage for the two community-docs freshness components, neither of which was imported by any test before this PR.

  • tests/people-freshness.test.mjs — asserts the live-data render against data/community-people.json, the long-form US date formatting, and the two branches that return null (unparseable and missing fetchedAt) instead of rendering Invalid Date.
  • tests/group-link-status.test.mjs — asserts the checkedAt verification line, the drift warning naming archived and unreachable upstream repositories, its singular/plural wording, the dropped verification line on an unparseable checkedAt, and a data file with no groups array.
  • tests/helpers-component-data.mjs — new helper. Both components read @site/data/*.json at module scope and take no props, so the branches the live data does not reach are unreachable from the real module; the helper imports a copy of the component with its @site/... JSON imports rewritten to fixtures, through the existing tests/helpers-jsx.mjs hooks. No component source changes.

No production code is touched. Full suite: 730 tests, 0 failures. node --test --experimental-test-coverage moves src/components/GroupLinkStatus/index.js from 17.80% to 87.18% lines and src/components/PeopleFreshness/index.js from unreported to 100% lines.

Files claimed: tests/helpers-component-data.mjs, tests/people-freshness.test.mjs, tests/group-link-status.test.mjs (all new; disjoint from the open test PRs #225, #435, #476, #479).

Related Issue

Closes #481


Filed by quality agent (hold-gated mode). Human review required.

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

Neither component was imported by any test: node --test coverage at 8c089a0
reports PeopleFreshness absent from the report entirely and GroupLinkStatus at
17.80% lines, while both render freshness and drift notes on the community
docs pages.

Both read their data from @site/data/*.json at module scope and take no props,
so branches the live data does not reach - an unparseable timestamp, an
archived or unreachable upstream repository - are unreachable from the real
module. tests/helpers-component-data.mjs imports a copy of the component with
its @site JSON imports rewritten to fixtures so those branches can be driven
without changing the component sources.

Signed-off-by: kubestellar-hive[bot] <kubestellar-hive@hive.kubestellar.io>
@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

Important

Held for human review by the hive's ACMM level gate.

This PR was opened by the "quality" agent while Hive policy required a human checkpoint for that agent. Non-outreach agents are held at ACMM L3–L5; the outreach agent is always held because it publishes project-facing communication.

Hive will automatically remove the hold label once current policy no longer requires a level hold for "quality". If this is an outreach PR, a human must review it and remove the label.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[quality] GroupLinkStatus and PeopleFreshness render with zero unit coverage

1 participant