Skip to content

docs: fix jest.config.js - #12999

Merged
shahednasser merged 1 commit into
medusajs:developfrom
leobenzol:patch-1
Jul 21, 2025
Merged

docs: fix jest.config.js#12999
shahednasser merged 1 commit into
medusajs:developfrom
leobenzol:patch-1

Conversation

@leobenzol

Copy link
Copy Markdown
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)

@leobenzol
leobenzol requested a review from a team as a code owner July 18, 2025 16:42
@changeset-bot

changeset-bot Bot commented Jul 18, 2025

Copy link
Copy Markdown

⚠️ 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

@vercel

vercel Bot commented Jul 18, 2025

Copy link
Copy Markdown

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

A member of the Team first needs to authorize it.

@shahednasser shahednasser left a comment

Copy link
Copy Markdown
Member

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
@leobenzol
leobenzol 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