Skip to content

Conversation

Smrtnyk
Copy link
Contributor

@Smrtnyk Smrtnyk commented Apr 17, 2025

oh boy this one was intense
moves image tests from qunit to vitest

Copy link

codesandbox bot commented Apr 17, 2025

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview

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 #10546
Example:

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

@@ -17,6 +17,7 @@ export default defineConfig({
test: {
pool: 'vmThreads',
clearMocks: true,
mockReset: true,
Copy link
Contributor Author

@Smrtnyk Smrtnyk Apr 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I noticed that spies were leaking between tests which made it very hard to test something in image suite
this made some other tests to break in Itext which I adapted

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah this should be the default honestly.

return img;
}

export async function createImage(
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I reworked these helpers a bit
because the version from qunit was a bit crazy

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider some tests are super super old and written with different expertise compared to today standards and capabilities.

Copy link
Contributor

Build Stats

file / KB (diff) bundled minified
fabric 913.863 (0) 301.232 (0)

Copy link
Contributor

github-actions bot commented Apr 19, 2025


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


=============================== Coverage summary ===============================
Statements   : 74.94% ( 21539/28739 )
Branches     : 60.51% ( 4003/6615 )
Functions    : 87.52% ( 1579/1804 )
Lines        : 79.22% ( 16412/20715 )
================================================================================

@asturur asturur merged commit 4378b63 into fabricjs:master Apr 19, 2025
20 checks passed
@Smrtnyk Smrtnyk deleted the refactor(tests)-move-image-tests-from-qunit-to-vitest branch April 20, 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