Skip to content

docs: fix jest.config.js #12999

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

Merged
merged 1 commit into from
Jul 21, 2025
Merged

Conversation

SteelRazor47
Copy link
Contributor

When following the docs to setup testing, you get the following error:

Failed to deserialize buffer as swc::config::Options
    JSON: {"jsc":{"parser":{"syntax":"typescript","decorators":true},"target":"es2023","transform":{"hidden":{"jest":true}}},"sourceMaps":"inline","module":{"type":"commonjs"},"filename":"integration-tests/setup.js"}

    Caused by:
        unknown variant `es2023`, expected one of `es3`, `es5`, `es2015`, `es2016`, `es2017`, `es2018`, `es2019`, `es2020`, `es2021`, `es2022`, `esnext` at line 1 column 246

It only happens when @swc/jest is manually installed, explicitly setting the target fixes it. In the starter it works since @swc/jest is not installed directly.

Steps to repro:

  • npx create-medusa-app
  • yarn test:integration:http (works)
  • yarn add --dev @swc/jest
  • yarn test:integration:http (error)

@SteelRazor47 SteelRazor47 requested a review from a team as a code owner July 18, 2025 16:42
Copy link

changeset-bot bot commented Jul 18, 2025

⚠️ No Changeset found

Latest commit: ddf42c6

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

Copy link

vercel bot commented Jul 18, 2025

@SteelRazor47 is attempting to deploy a commit to the medusajs Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Member

@shahednasser shahednasser left a comment

Choose a reason for hiding this comment

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

Thanks!

@shahednasser shahednasser merged commit 637a200 into medusajs:develop Jul 21, 2025
25 of 35 checks passed
@SteelRazor47 SteelRazor47 deleted the patch-1 branch July 21, 2025 08:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants