Skip to content
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

Go all-in with Jest ESM migration #2494

Closed
wants to merge 20 commits into from

Conversation

wojtekmaj
Copy link
Contributor

@wojtekmaj wojtekmaj commented Jan 15, 2024

Requires #2409.

This is an optional, intermediate step between full Vitest migration. It completely drops usage of Jest's magic globals, instead relying on @jest/globals, for importing describe, test, expect, it

This is probably for the better regardless of whether or not we would like to migrate to Vitest, as this makes Jest far easier to work with in TypeScript environment, especially when working along other testing tools like Playwright.

If we do want to migrate to Vitest though, this PR will make majority of the migration to be as simple as find-and-replace @jest/globals to vitest.

  • If you don't want react-pdf to be migrated to Vitest, consider the above, feel free to close if you don't find this useful.
  • If you want react-pdf to be migrated to Vitest, and:
    • don't want extra clarity (noise?) in your commits on how this migration is done, feel free to close. This will not block Vitest migration PR.
    • want extra clarity on Jest -> Vitest migration process in your commits, please merge.

Copy link

changeset-bot bot commented Jan 15, 2024

🦋 Changeset detected

Latest commit: a3baaa6

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 13 packages
Name Type
@react-pdf/primitives Minor
@react-pdf/stylesheet Minor
@react-pdf/examples Minor
@react-pdf/renderer Minor
@react-pdf/textkit Minor
@react-pdf/layout Minor
@react-pdf/pdfkit Minor
@react-pdf/png-js Minor
@react-pdf/render Minor
@react-pdf/svgkit Minor
@react-pdf/image Minor
@react-pdf/font Minor
@react-pdf/fns Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@wojtekmaj
Copy link
Contributor Author

Screw this - Jest is fundamentally broken. Let's go straight for #2495.

@wojtekmaj wojtekmaj closed this Jan 18, 2024
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.

1 participant