Skip to content

Conversation

Smrtnyk
Copy link
Contributor

@Smrtnyk Smrtnyk commented Apr 14, 2025

This moves brushes tests from qunit to vitest

Copy link

codesandbox bot commented Apr 14, 2025

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview

).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);
Copy link
Contributor Author

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

Copy link
Member

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.

Copy link
Contributor

It seems that you opened a PR but you didn't add a line to the changelog file
Please under the ## [next] version tag, add a line describing the changes of your pr with this format:
ci/chore/tests/feature/fix(): Some extended description #10528
Example:

  refactor(tests): move brushes tests from qunit to vitest [#10528](https://github.com/fabricjs/fabric.js/pull/10528)

@Smrtnyk Smrtnyk force-pushed the refactor(tests)-move-brushes-tests-from-qunit-to-vitest branch from ba2b9aa to c9b6f80 Compare April 14, 2025 18:28
Copy link
Contributor

Build Stats

file / KB (diff) bundled minified
fabric 917.078 (+0.045) 301.846 (0)

@asturur asturur merged commit 605aa42 into fabricjs:master Apr 14, 2025
21 checks passed
Copy link
Contributor


> fabric@6.6.2 coverage:report:ci
> nyc report --reporter=text-summary


=============================== Coverage summary ===============================
Statements   : 72.46% ( 20874/28806 )
Branches     : 59.9% ( 3840/6410 )
Functions    : 87.16% ( 1575/1807 )
Lines        : 76.92% ( 15970/20760 )
================================================================================

@Smrtnyk Smrtnyk deleted the refactor(tests)-move-brushes-tests-from-qunit-to-vitest branch April 17, 2025 12:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants