Skip to content

Unable to use jest v30 #31778

Open
Open
@khpatel4991

Description

@khpatel4991

Current Behavior

Jest version 30 uses option named testPathPatterns instead of testPathPattern which is used in @nx/jest package. This prevents use from upgrading to latest version of jest.

Changelog for v30.

Workaround is to force jest to stay at v29.7.0

Expected Behavior

@nx/jest should work with jest v30

GitHub Repo

No response

Steps to Reproduce

  1. Initialize nx project with jest. Upgrade jest to v30 and @nx/jest to v21.2.1.
  2. Try running a test from any lib.
  3. It fails with error saying Option "testPathPattern" was replaced by "--testPathPatterns". "--testPathPatterns" is only available as a command-line option.

Nx Report

N/A

Failure Logs

Package Manager Version

No response

Operating System

  • macOS
  • Linux
  • Windows
  • Other (Please specify)

Additional Information

No response

Metadata

Metadata

Assignees

Labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions