You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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)
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)
Found explicit usage of the removed import path in app/javascript/mastodon/test_setup.js:1 with 'import '@testing-library/jest-dom/extend-expect';'
Jest configuration at jest.config.js:13 explicitly references the test_setup.js file in setupFilesAfterEnv, confirming this breaking change will cause test failures
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
Found extensive community reports confirming this breaking change causes 'Cannot find module' errors and requires import path updates
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)
This breaking change is identical to the first one - both describe the removal of extend-expect functionality in favor of default/platform-specific imports
The codebase uses Jest as the test framework and references the affected test_setup.js file, so this change impacts test configuration
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)
Package.json specifies 'node': '>=14' in engines field, matching the new requirement exactly
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
Project already specifies Node.js >=14, but the specific jest-dom requirements may be more restrictive (requires 14.15.0+ for Node 14.x)
✓ @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)
Package.json shows @testing-library/jest-dom in devDependencies at version ^6.7.0, no explicit peer dependencies listed for jest-dom
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
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
No conflicts or resolution issues found in yarn.lock related to @testing-library/jest-dom dependencies
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
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'↩
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 ↩
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 ↩
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 ↩
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dependenciesPull requests that update a dependency filejavascriptPull requests that update javascript code
0 participants
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bumps @testing-library/jest-dom from 5.16.5 to 6.7.0.
Release notes
Sourced from
@testing-library/jest-dom's releases.... (truncated)
Commits
e15f789docs: add kretajak as a contributor for code, and test (#691)cfdf8aefeat: add toBePressed matcher (#203) (#658)f00d94dchore: adddependebot.yml(#456)476c30brefactor: droplodashentirely (#676)fafd8cachore: add tests for Node 22 & 24 (#678)d9babb1docs: fix typo (#667)f0f31bbdocs: adopt the new build-badge URL (#497)707e647perf: replace chalk with picocolors (#659)918b6fbdocs: add InfiniteXyy as a contributor for code, and bug (#650)5ba0156fix: add vitest import when extending vitest matchers (#646)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 rebasewill rebase this PR@dependabot recreatewill recreate this PR, overwriting any edits that have been made to it@dependabot mergewill merge this PR after your CI passes on it@dependabot squash and mergewill squash and merge this PR after your CI passes on it@dependabot cancel mergewill cancel a previously requested merge and block automerging@dependabot reopenwill reopen this PR if it is closed@dependabot closewill close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually@dependabot show <dependency name> ignore conditionswill show all of the ignore conditions of the specified dependency@dependabot ignore this major versionwill 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 versionwill 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 dependencywill close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)