Repository navigation
chore: Skip createWrapper export in test-utils docs - #195
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. ❌ Your project check has failed because the head coverage (88.33%) is below the target coverage (90.00%). You can increase the head coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #195 +/- ##
=======================================
Coverage 88.33% 88.33%
=======================================
Files 26 26
Lines 360 360
Branches 104 105 +1
=======================================
Hits 318 318
Misses 42 42 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues were identified for the change excluding createWrapper from test-utils class documentation.
No open issues 🎉
What changed in this PR
Prepares test-utils documentation generation for the upcoming named createWrapper export, preventing the documenter from treating it as a class.
Changes:
- Adds
createWrapperto the DOM and selector test-utilsextraExportslists. - Leaves behavior unchanged while the export is absent.
| File | Description |
|---|---|
scripts/docs.js |
Excludes createWrapper from class documentation in both test-utils configurations. |
Review effort: Balanced
| domUtils: { | ||
| root: "src/test-utils/dom/index.ts", | ||
| extraExports: ["default", "ElementWrapper"], | ||
| extraExports: ["default", "ElementWrapper", "createWrapper"], |
There was a problem hiding this comment.
Will each repo need this change? Should we consider make a change in documenter instead?
There was a problem hiding this comment.
Yes. I’ve already merged this change in the other three repositories, and the remaining change is under review. I think it’s better to keep this out of documenter because the explicit list prevents documenter from automatically ignoring function exports. We Can update it in the documenter if we find a good reason to do so in the future.
Description
The docs step throws when the generated test-utils index exports the new named
createWrapperfrom test-utils #143 because the export is not a class.This adds
createWrapperto both test-utilsextraExportslists. The change is a no-op until the new converter is released because the documenter only checks exports that exist.Related: cloudscape-design/test-utils#143
Related: cloudscape-design/components#5261
How has this been tested?
ESLint and Prettier pass for
scripts/docs.js.Review checklist
The following items are to be evaluated by the author(s) and the reviewer(s).
Correctness
CONTRIBUTING.md.CONTRIBUTING.md.Security
checkSafeUrlfunction.Testing
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.