Skip to content

Fix: Update Jest config to allow @faker-js v10#1009

Merged
nima-ct merged 2 commits intomainfrom
nj-fix-faker-dep
Feb 10, 2026
Merged

Fix: Update Jest config to allow @faker-js v10#1009
nima-ct merged 2 commits intomainfrom
nj-fix-faker-dep

Conversation

@nima-ct
Copy link
Contributor

@nima-ct nima-ct commented Feb 10, 2026

We moved from v9 to v10 recently and @faker-js v10 is now ESM only.

Tests that imported modules depending on faker were failing with a “Cannot use import statement outside a module.”
See https://github.com/commercetools/test-data/actions/runs/21824400384/job/62965470826?pr=1008.
(these tests pass when switching to v9)

Jest was no longer transforming it so this PR adjusts transformIgnorePatterns to allow Jest to transform @faker-js/faker in in node_modules and prevent ESM import errors.

@changeset-bot
Copy link

changeset-bot bot commented Feb 10, 2026

⚠️ No Changeset found

Latest commit: e03dfe4

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

@nima-ct nima-ct merged commit fa4179a into main Feb 10, 2026
5 checks passed
@nima-ct nima-ct deleted the nj-fix-faker-dep branch February 10, 2026 09:01
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.

3 participants