-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
refactor(tests): migrate object tests to vitest #10562
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
Conversation
Review or Edit in CodeSandboxOpen the branch in Web Editor • VS Code • Insiders |
@@ -734,7 +734,7 @@ export class FabricObject< | |||
*/ | |||
hasStroke() { | |||
return ( | |||
this.stroke && this.stroke !== 'transparent' && this.strokeWidth !== 0 | |||
!!this.stroke && this.stroke !== 'transparent' && this.strokeWidth !== 0 |
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.
without this it would return empty string
although "falsy" it is not a boolean
qunit was testing this loosely treating empty string as false
but vitest is bit more strict and precise here
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.
the intention of this is to be a boolean, can you add it to the typo of hasStroke explicitly?
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.
You mean to add :boolean as return type of this method?
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.
done
ok update changelog seem to work finally |
Build Stats
|
|
No description provided.