-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
refactor(tests): move brushes tests from qunit to vitest #10528
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 brushes tests from qunit to vitest #10528
Conversation
Review or Edit in CodeSandboxOpen the branch in Web Editor • VS Code • Insiders |
src/brushes/PencilBrush.spec.ts
Outdated
).toBe(true); | ||
expect(firePathCreatedEvent, 'path:created event is fired').toBe(true); | ||
expect(added, 'a path is added').toBeInstanceOf(Path); | ||
expect(added!.path.length, 'path has 6 steps').toBe(6); |
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 can you have a look at this one?
it is failing because in jsdom it is yielding 4 instead of 6
seems like there is a difference in browser and jsdom for paths
I am not that familiar with paths in canvas so maybe you can figure out what the issue here is
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 looked into this 30 minutes.
I see the code in decimatePath is killing the point before the last one, skipping to iterate over it.
I added a TODO but for now it puzzles me that it was working with qunit, it should have failed there too.
It seems that you opened a PR but you didn't add a line to the changelog file
|
ba2b9aa
to
c9b6f80
Compare
Build Stats
|
|
This moves brushes tests from qunit to vitest