Skip to content

chore: Skip createWrapper export in test-utils docs - #195

Merged
amanabiy merged 1 commit into
mainfrom
fix/test-utils-docs-create-wrapper
Nov 26, 2026
Merged

amanabiy merged 1 commit into
mainfrom
fix/test-utils-docs-create-wrapper

Conversation

@amanabiy

Copy link
Copy Markdown
Member

Description

The docs step throws when the generated test-utils index exports the new named createWrapper from test-utils #143 because the export is not a class.

This adds createWrapper to both test-utils extraExports lists. 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

  • Changes include appropriate documentation updates.
  • Changes are backward-compatible if not indicated, see CONTRIBUTING.md.
  • Changes do not include unsupported browser features, see CONTRIBUTING.md.
  • Changes were manually tested for accessibility, see accessibility guidelines.

Security

Testing

  • Changes are covered with new/existing unit tests?
  • Changes are covered with new/existing integration tests?

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@amanabiy
amanabiy requested a review from a team as a code owner November 25, 2026 10:25
@amanabiy
amanabiy requested review from jperals and removed request for a team November 25, 2026 10:25
@amanabiy amanabiy changed the title fix: Skip createWrapper export in test-utils docs chore: Skip createWrapper export in test-utils docs Nov 25, 2026
@amanabiy
amanabiy enabled auto-merge November 25, 2026 10:28
@codecov

codecov Bot commented Nov 25, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.33%. Comparing base (cdb626f) to head (fddc5c5).

❌ 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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 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 createWrapper to the DOM and selector test-utils extraExports lists.
  • 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

Comment thread scripts/docs.js
domUtils: {
root: "src/test-utils/dom/index.ts",
extraExports: ["default", "ElementWrapper"],
extraExports: ["default", "ElementWrapper", "createWrapper"],

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will each repo need this change? Should we consider make a change in documenter instead?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@amanabiy
amanabiy added this pull request to the merge queue Nov 26, 2026
Merged via the queue into main with commit 54f0977 Nov 26, 2026
48 of 49 checks passed
@amanabiy
amanabiy deleted the fix/test-utils-docs-create-wrapper branch November 26, 2026 15:34

This branch was successfully deployed

1 active deployment
dev-pages — fddc5c5e Deployed Nov 25, 2026 by amanabiy via deploy / deploy #862
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.

3 participants