scorecard example for backend tests#3414
Conversation
Missing ChangesetsThe following package(s) are changed by this PR but do not have a changeset:
See CONTRIBUTING.md for more information about how to add changesets. Changed Packages
|
|
This pull request adds a new top-level directory under |
|
🤖 Finished Review · ✅ Success · Started 10:27 AM UTC · Completed 10:35 AM UTC |
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3414 +/- ##
==========================================
+ Coverage 54.00% 54.03% +0.02%
==========================================
Files 2404 2403 -1
Lines 87626 87623 -3
Branches 24263 24263
==========================================
+ Hits 47324 47343 +19
+ Misses 38802 38780 -22
Partials 1500 1500
*This pull request uses carry forward flags. Click here to find out more. Continue to review full report in Codecov by Harness.
🚀 New features to boost your workflow:
|
ReviewFindingsLow
Info
|
| const BASE_CONFIG = { | ||
| backend: { | ||
| database: { | ||
| client: 'better-sqlite3', |
There was a problem hiding this comment.
[low] test-integrity
The afterAll hook calls server.close() without awaiting or handling its callback. http.Server.close() does not return a promise, so connections may still be draining when Jest proceeds. This can cause open handle warnings or flaky teardown. The same pattern appears at line 155.
| '/api/scorecard/metrics?metricIds=sonar.quality&datasource=github', | ||
| ); | ||
|
|
||
| expect(res.status).toBe(400); |
There was a problem hiding this comment.
[low] test-adequacy
The KPI config test defines type statusGrouped and asserts aggregationType statusGrouped, but this is also the default value. The assertion passes regardless of whether the config-driven path or the fallback is taken. Testing with a non-default type would provide stronger assurance.



Hey, I just made a Pull Request!
RHIDP-14185
✔️ Checklist