Skip to content

Bump @testing-library/jest-dom from 5.16.5 to 6.7.0#256

Closed
dependabot[bot] wants to merge 1 commit intomainfrom
dependabot/npm_and_yarn/testing-library/jest-dom-6.7.0
Closed

Bump @testing-library/jest-dom from 5.16.5 to 6.7.0#256
dependabot[bot] wants to merge 1 commit intomainfrom
dependabot/npm_and_yarn/testing-library/jest-dom-6.7.0

Conversation

@dependabot
Copy link

@dependabot dependabot bot commented on behalf of github Aug 18, 2025

Bumps @testing-library/jest-dom from 5.16.5 to 6.7.0.

Release notes

Sourced from @​testing-library/jest-dom's releases.

v6.7.0

6.7.0 (2025-08-13)

Features

v6.6.4

6.6.4 (2025-07-26)

Performance Improvements

v6.6.3

6.6.3 (2024-10-31)

Bug Fixes

  • add vitest import when extending vitest matchers (#646) (5ba0156)

v6.6.2

6.6.2 (2024-10-17)

Bug Fixes

  • remove recursive type reference in vitest types (#636) (4468378)

v6.6.1

6.6.1 (2024-10-16)

Bug Fixes

  • fix lodash import in to-have-selection.js (#642) (ced792e)

v6.6.0

6.6.0 (2024-10-16)

Features

v6.5.0

6.5.0 (2024-08-23)

... (truncated)

Commits

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [@testing-library/jest-dom](https://github.com/testing-library/jest-dom) from 5.16.5 to 6.7.0.
- [Release notes](https://github.com/testing-library/jest-dom/releases)
- [Changelog](https://github.com/testing-library/jest-dom/blob/main/CHANGELOG.md)
- [Commits](testing-library/jest-dom@v5.16.5...v6.7.0)

---
updated-dependencies:
- dependency-name: "@testing-library/jest-dom"
  dependency-version: 6.7.0
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot added dependencies Pull requests that update a dependency file javascript Pull requests that update javascript code labels Aug 18, 2025
@fossabot
Copy link

fossabot bot commented Aug 18, 2025

fossabot is Thinking

@fossabot
Copy link

fossabot bot commented Aug 18, 2025

⚠️ Not safe to upgrade

I recommend holding off on this update until the breaking import path can be addressed. The upgrade from @testing-library/jest-dom 5.16.5 to 6.7.0 removes the /extend-expect entry point that your Jest test setup currently relies on, which will cause all tests to fail with module resolution errors. The fix requires changing the import in test_setup.js from import '@testing-library/jest-dom/extend-expect' to import '@testing-library/jest-dom' to use the new default entry point.

  • I searched the codebase for usage of the deprecated /extend-expect import path1
  • I verified Jest configuration dependencies to confirm test impact2
  • I confirmed the version change includes the breaking modification3
  • I researched ecosystem impact to validate the breaking change scope4

Change Details

⚠️ @testing-library/jest-dom: The `/extend-expect` entry point was removed in version 6.0.0. The import statement `import '@testing-library/jest-dom/extend-expect';` in test_setup.js will fail with a module not found error. This must be changed to `import '@testing-library/jest-dom';` to use the default entry point.

Status: ⚠️ Impacted - Manual intervention required

The codebase directly uses the removed /extend-expect import path in test_setup.js, which is referenced by Jest configuration. This will cause immediate test failures with 'Cannot find module' errors when running Jest tests with version 6.x.

Validations (4)
  1. Found explicit usage of the removed import path in app/javascript/mastodon/test_setup.js:1 with 'import '@testing-library/jest-dom/extend-expect';'

  2. Jest configuration at jest.config.js:13 explicitly references the test_setup.js file in setupFilesAfterEnv, confirming this breaking change will cause test failures

  3. Package.json specifies '@testing-library/jest-dom': '^6.7.0' and yarn.lock confirms version 6.7.0 is installed, which has the breaking change

  4. Found extensive community reports confirming this breaking change causes 'Cannot find module' errors and requires import path updates

Citations (3)

/tmp/fossabot/2025-08-18T04:59:20.381Z/repository/app/javascript/mastodon/test_setup.js

This import uses the removed /extend-expect entry point and will cause tests to fail. Fix: Change to 'import '@testing-library/jest-dom';'

/tmp/fossabot/2025-08-18T04:59:20.381Z/repository/jest.config.js

Jest configuration references the test setup file containing the broken import, confirming tests will fail

Additional Citations:

Summary: Official release notes confirming the /extend-expect entry point removal in version 6.0.0

https://github.com/testing-library/jest-dom/releases/tag/v6.0.0

BREAKING CHANGES Removes the extend-expect script. Users should use the default import path


⚠️ @testing-library/jest-dom: Removes the extend-expect script. Users must now use default import path or test platform-specific paths (@testing-library/jest-dom, @testing-library/jest-dom/jest-globals, @testing-library/jest-dom/vitest) to automatically extend the appropriate expect instance.

Status: ⚠️ Impacted - Manual intervention required

This is the same breaking change as the first one, describing the removal of extend-expect script functionality. The impact is identical - the codebase uses the removed functionality and requires migration to the new import path.

Validations (2)
  1. This breaking change is identical to the first one - both describe the removal of extend-expect functionality in favor of default/platform-specific imports

  2. The codebase uses Jest as the test framework and references the affected test_setup.js file, so this change impacts test configuration

Citations (1)

/tmp/fossabot/2025-08-18T04:59:20.381Z/repository/app/javascript/mastodon/test_setup.js

This import uses the removed extend-expect script functionality and must be updated to use the default import path


✓ Safe Breaking Changes (2)
✓ @testing-library/jest-dom: Node.js version requirement increased from previous versions to >= 14

Status: ✓ Safe - No impact detected

The project's package.json already specifies 'node': '>=14' which meets the basic requirement. However, developers should ensure they're using Node.js 14.15.0+ if on the 14.x branch to meet @testing-library/jest-dom's specific version requirements. This is more of a compatibility note than a breaking change for this codebase.

Validations (3)
  1. Package.json specifies 'node': '>=14' in engines field, matching the new requirement exactly

  2. Found that @testing-library/jest-dom requires 'node': '^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0', which is more restrictive than >=14 general requirement

  3. Project already specifies Node.js >=14, but the specific jest-dom requirements may be more restrictive (requires 14.15.0+ for Node 14.x)

Citations (2)

/tmp/fossabot/2025-08-18T04:59:20.381Z/repository/package.json

Project already specifies Node.js >=14 requirement, which meets the jest-dom v6+ Node.js requirement

Additional Citations:

Summary: Shows the specific Node.js version requirements for @testing-library/jest-dom, which are already compatible with this project

https://stackoverflow.com/questions/72686478/cannot-install-testing-library-jest-dom-with-node-16-2-0

notsup Required: {"node":"^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0"}


✓ @testing-library/jest-dom: Dropped peer dependencies from package.json which may affect dependency resolution

Status: ✓ Safe - No impact detected

The dropping of peer dependencies from @testing-library/jest-dom's package.json appears to be a simplification that reduces dependency management complexity rather than causing breaking changes. The package successfully resolves in yarn.lock without issues, and the ecosystem impact is minimal for this codebase.

Validations (4)
  1. Package.json shows @testing-library/jest-dom in devDependencies at version ^6.7.0, no explicit peer dependencies listed for jest-dom

  2. Yarn.lock successfully resolves @testing-library/jest-dom@6.7.0 with dependencies @adobe/css-tools, aria-query, and css.escape - no missing peer dependencies

  3. Found that the broader Testing Library ecosystem has been shifting peer dependency management, but jest-dom's peer dependency removal appears to simplify rather than complicate installation

  4. No conflicts or resolution issues found in yarn.lock related to @testing-library/jest-dom dependencies

Citations (2)

/tmp/fossabot/2025-08-18T04:59:20.381Z/repository/yarn.lock

Yarn.lock shows successful resolution of @testing-library/jest-dom without peer dependency issues, indicating the peer dependency removal has not caused problems

Additional Citations:

Summary: Official changelog confirms peer dependencies were dropped as an intentional change, likely to simplify package management

https://github.com/testing-library/jest-dom/releases

Drop peerDependencies from package.json


Was this helpful? 👍 👎

Footnotes

  1. Found explicit usage in app/javascript/mastodon/test_setup.js:1 with the exact import statement that will break: import '@testing-library/jest-dom/extend-expect'

  2. Found that jest.config.js:13 explicitly references test_setup.js in the setupFilesAfterEnv array, confirming this breaking change will prevent all Jest tests from running

  3. Package.json specifies @testing-library/jest-dom: ^6.7.0 and yarn.lock shows version 6.7.0 is installed, which has completely removed the extend-expect entry point

  4. Found extensive community documentation confirming this change causes 'Cannot find module' errors across Jest-based projects and requires the specific import path update I identified

@dependabot @github
Copy link
Author

dependabot bot commented on behalf of github Aug 25, 2025

Superseded by #264.

@dependabot dependabot bot closed this Aug 25, 2025
@dependabot dependabot bot deleted the dependabot/npm_and_yarn/testing-library/jest-dom-6.7.0 branch August 25, 2025 03:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file javascript Pull requests that update javascript code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants