Enforce that tabs have at least one item.#798
Conversation
There was a problem hiding this comment.
Code Review
This pull request correctly adds a minItems: 1 constraint to the tabs array in both v0.9 and v0.10 specifications, ensuring a Tabs component cannot be empty. My feedback focuses on the lack of accompanying tests for this change, which is required by the repository's contribution guidelines. Please add test cases that verify an empty tabs array fails validation for both specification versions.
Note: Security Review has been skipped due to the limited scope of the PR.
| "tabs": { | ||
| "type": "array", | ||
| "description": "An array of objects, where each object defines a tab with a title and a child component.", | ||
| "minItems": 1, |
There was a problem hiding this comment.
This change correctly enforces that a Tabs component must have at least one tab. However, it is missing a corresponding test case for the v0.9 specification. To ensure this constraint is validated, please add a test case with a Tabs component that has an empty tabs array and is expected to fail validation.
References
- If there are code changes, code should have tests. (link)
* Enforce that tabs have at least one item. * Add test cases.
Description
Prior to this change, it would be possible to have an empty array of tab items.
Pre-launch Checklist