-
Notifications
You must be signed in to change notification settings - Fork 213
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix unit test warnings #5172
Fix unit test warnings #5172
Conversation
Latest k6 run output1
Footnotes
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I confirm I see far fewer warnings. Great!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice to have fewer warnings.
Fixes
Related to #5171 by @obulat
Description
This PR introduces multiple improvements to the unit tests to eliminate warnings and produce cleaner output.
Removed the custom
render-suspended
function we used to overridenuxt/test-utils
. Since we now consistently use script setup instead of defineComponent, the default render-suspended function works seamlessly.Updated component props. Several components' props have changed, so I updated them in tests.
Added ESLint Rule for props with defaults:
"vue/no-required-prop-with-default"
ESLint rule marks a prop optional if this prop has a default value. This helped fix a couple of warnings and components ( for example,VHomeLink
,VLogoloader
).Updated issue Link: Corrected the issue link to point to the tracker for unit test fixes following the migration to Nuxt 3.
Addressed prop fall-through in complex components:
When a component is complex, such as a
VTag
that:is="VButton"
that:is="VLink"
(3 levels of nestedness), the prop does not always fall through, at least in the unit tests, so I added manual binding of thehref
toVButton
if thecomponent
inVButton
is aVLink
.Testing Instructions
Run the unit tests using
ov just frontend/run test:unit
.You should see much fewer warnings.
Checklist
Update index.md
).main
) or a parent feature branch.ov just catalog/generate-docs
for catalogPRs) or the media properties generator (
ov just catalog/generate-docs media-props
for the catalog or
ov just api/generate-docs
for the API) where applicable.Developer Certificate of Origin
Developer Certificate of Origin