-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
refactor(tests): move canvas dispose tests from qunit to vitest #10536
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
refactor(tests): move canvas dispose tests from qunit to vitest #10536
Conversation
Review or Edit in CodeSandboxOpen the branch in Web Editor • VS Code • Insiders |
It seems that you opened a PR but you didn't add a line to the changelog file
|
expect(canvas.disposed, 'should flag `disposed`').toBeTruthy(); | ||
} | ||
called++; | ||
// TODO: check typings, because this runs for both static and normal canvas but it is only typed on normal canvas |
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.
@asturur left this comment here in case you are curious
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.
FabricJS typings have been hard.
The fact that every class of object carries with it the types of the export and the props it expects in the constructor makes everything complicated.
Collection.ts is a piece of code shared between group and staticCanvas so it is a mixin, but TS doesn't really support mixins natively.
The staticCanvas works with fabricObejct while Canvas works with InteractiveObject.
The migration from plain JS to TS was done how it could have been done and bigger rewrites are necessary to make typing smooth.
Our issues are mainly docs and time dedicated to it. If we ever manage to write good docs with explanations and overwies then those refactors are less painful because you know what kind of documentation you have to keep updated as well.
For now it is what is is, autocompletion of classes,properties,custom properties and events works and that is a big upside, the rest will come a piece at time.
Build Stats
|
|
this moves canvas dispose tests from qunit to vitest