-
Notifications
You must be signed in to change notification settings - Fork 0
[Snyk] Upgrade @testing-library/jest-dom from 5.12.0 to 5.17.0 #23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Snyk has created this PR to upgrade @testing-library/jest-dom from 5.12.0 to 5.17.0. See this package in npm: @testing-library/jest-dom See this project in Snyk: https://app.snyk.io/org/mohammadnewton/project/d15594e4-5f31-48ca-bda2-b52bb1f1e8fc?utm_source=github&utm_medium=referral&page=upgrade-pr
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello @nejidevelops, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!
Summary of Changes
Hello team,
Gemini here, providing a summary of this pull request to help everyone quickly understand the changes and context.
This PR, automatically generated by Snyk, aims to upgrade the @testing-library/jest-dom dependency from version ^5.11.4 to ^5.17.0. The primary goal is to keep dependencies up-to-date, which helps in addressing existing vulnerabilities and makes it easier to handle future security disclosures. The upgrade spans multiple versions, incorporating various bug fixes, features, and updates as detailed in the release notes provided in the PR description.
Highlights
- Dependency Upgrade: The core change is the upgrade of
@testing-library/jest-domfrom version^5.11.4to^5.17.0. - New Matcher and Deprecation: Version 5.17.0 introduces a new
toHaveAccessibleErrorMessagematcher and deprecates the oldertoHaveErrorMessage. - Bug Fixes and Improvements: Several bug fixes and minor improvements are included across the versions being upgraded, such as better support for custom elements in
toBeDisabled, improved error messages fortoHaveClassandtoHaveFocus, and updates to internal dependencies likearia-queryand@adobe/css-tools.
Changelog
- package.json
- Updated the version range for
@testing-library/jest-domdependency from^5.11.4to^5.17.0(as seen on line 6).
- Updated the version range for
Using Gemini Code Assist
The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.
Invoking Gemini
You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.
| Feature | Command | Description |
|---|---|---|
| Code Review | /gemini review |
Performs a code review for the current pull request in its current state. |
| Pull Request Summary | /gemini summary |
Provides a summary of the current pull request in its current state. |
| Comment | @gemini-code-assist | Responds in comments when explicitly tagged, both in issue comments and review comments. |
| Help | /gemini help |
Displays a list of available commands. |
Customization
To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.
Limitations & Feedback
Gemini Code Assist is currently in preview and may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments to provide feedback.
You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.
Tests run green and bright,
Dependencies take their flight,
Code is safe tonight.
Footnotes
-
Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request, automatically generated by Snyk, proposes an upgrade for the @testing-library/jest-dom package from version 5.12.0 (resolved from ^5.11.4) to ^5.17.0. Keeping dependencies up-to-date is crucial for security and stability.
The upgrade spans 12 minor/patch versions and includes various bug fixes and feature enhancements. However, the most significant change to be aware of is the deprecation of the toHaveErrorMessage matcher in version 5.17.0, which is replaced by toHaveAccessibleErrorMessage. This may require updates to your existing test suite.
Overall, this is a beneficial upgrade, but it requires careful verification.
Summary of Findings
- Potential Test Impact from Deprecated Matcher: The upgrade to
@testing-library/[email protected]deprecates thetoHaveErrorMessagematcher in favor oftoHaveAccessibleErrorMessage. This change may cause existing tests to fail or produce deprecation warnings. It's crucial to identify and update any usages of the deprecated matcher. - Dependency Update Verification: As with any dependency upgrade, especially one spanning multiple versions, thorough testing is required to ensure no regressions or unexpected behavior are introduced into the application.
Merge Readiness
This PR proposes a necessary dependency upgrade. However, due to the deprecation of the toHaveErrorMessage matcher in @testing-library/[email protected], there's a high likelihood that test code changes will be required.
I recommend that this PR not be merged until:
- The test suite has been executed successfully with the new version.
- A thorough search for the deprecated
toHaveErrorMessagematcher has been conducted. - Any instances of the deprecated matcher have been updated to the new
toHaveAccessibleErrorMessage.
As I am an AI assistant, I am not authorized to approve pull requests. Please ensure these checks are performed and consider having another developer review and approve these changes before merging.
| "private": true, | ||
| "dependencies": { | ||
| "@testing-library/jest-dom": "^5.11.4", | ||
| "@testing-library/jest-dom": "^5.17.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The upgrade of @testing-library/jest-dom to ^5.17.0 is a significant jump from ^5.11.4 (which Snyk indicates was resolved to 5.12.0).
While this update brings various improvements and bug fixes, a key change in version 5.17.0 is the introduction of a new matcher toHaveAccessibleErrorMessage and the deprecation of the existing toHaveErrorMessage matcher.
Could you please ensure the following before merging?
- Thoroughly run the test suite: Verify that all existing tests pass with the new version.
- Check for
toHaveErrorMessageusage: Search your codebase for any instances of thetoHaveErrorMessagematcher. - Migrate to
toHaveAccessibleErrorMessage: IftoHaveErrorMessageis used, please update these instances to use the newtoHaveAccessibleErrorMessagematcher as per the library's recommendations. This will prevent future breakage when the deprecated matcher is eventually removed and ensure your tests align with the latest accessibility best practices.
This is important to address to maintain test suite health and avoid future compatibility issues.
Snyk has created this PR to upgrade @testing-library/jest-dom from 5.12.0 to 5.17.0.
ℹ️ Keep your dependencies up-to-date. This makes it easier to fix existing vulnerabilities and to more quickly identify and fix newly disclosed vulnerabilities when they affect your project.
The recommended version is 12 versions ahead of your current version.
The recommended version was released 2 years ago.
Release notes
Package name: @testing-library/jest-dom
-
5.17.0 - 2023-07-18
- New
-
5.16.5 - 2022-08-04
- migrate ccs v3 to @ adobe/css-tools v4 (#470) (948d90f)
-
5.16.4 - 2022-04-05
- Support unenclosed inner text for details elements in to be visible (#396) (af18453)
-
5.16.3 - 2022-03-24
- clarify toHaveFocus message when using
-
5.16.2 - 2022-02-03
- add custom element support to
-
5.16.1 - 2021-12-06
- Improve
-
5.16.0 - 2021-12-03
- Update aria-query to 5.0.0 (#414) (de26c7a)
-
5.15.1 - 2021-11-23
- wrong deprecate error message (#422) (dfcefa2)
-
5.15.0 - 2021-11-02
- import parse directly from css (#415) (4cb606c)
-
5.14.1 - 2021-06-11
- Updates deprecated matchers info (#378) (fc9ce6d)
-
5.14.0 - 2021-06-11
-
5.13.0 - 2021-06-03
-
5.12.0 - 2021-04-22
from @testing-library/jest-dom GitHub release notes5.17.0 (2023-07-18)
Features
toHaveAccessibleErrorMessagebetter implementing the spec, deprecatetoHaveErrorMessage(#503) (d717c66)5.16.5 (2022-08-04)
Bug Fixes
5.16.4 (2022-04-05)
Bug Fixes
5.16.3 (2022-03-24)
Bug Fixes
.not(#447) (6988a67)5.16.2 (2022-02-03)
Bug Fixes
toBeDisabled(#368) (8162115)5.16.1 (2021-12-06)
Bug Fixes
toHaveClasserror message format (#405) (a9beb47)5.16.0 (2021-12-03)
Features
5.15.1 (2021-11-23)
Bug Fixes
5.15.0 (2021-11-02)
Features
5.14.1 (2021-06-11)
Bug Fixes
Important
Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open upgrade PRs.
For more information: