Skip to content

Conversation

@nejidevelops
Copy link
Owner

snyk-top-banner

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 from @testing-library/jest-dom GitHub release notes

Important

  • Check the changes in this PR to ensure they won't cause issues with your project.
  • This PR was automatically created by Snyk using the credentials of a real user.

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:

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
Copy link

@gemini-code-assist gemini-code-assist bot left a 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-dom from version ^5.11.4 to ^5.17.0.
  • New Matcher and Deprecation: Version 5.17.0 introduces a new toHaveAccessibleErrorMessage matcher and deprecates the older toHaveErrorMessage.
  • 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 for toHaveClass and toHaveFocus, and updates to internal dependencies like aria-query and @adobe/css-tools.

Changelog

  • package.json
    • Updated the version range for @testing-library/jest-dom dependency from ^5.11.4 to ^5.17.0 (as seen on line 6).
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

  1. 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.

Copy link

@gemini-code-assist gemini-code-assist bot left a 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 the toHaveErrorMessage matcher in favor of toHaveAccessibleErrorMessage. 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:

  1. The test suite has been executed successfully with the new version.
  2. A thorough search for the deprecated toHaveErrorMessage matcher has been conducted.
  3. 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",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

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?

  1. Thoroughly run the test suite: Verify that all existing tests pass with the new version.
  2. Check for toHaveErrorMessage usage: Search your codebase for any instances of the toHaveErrorMessage matcher.
  3. Migrate to toHaveAccessibleErrorMessage: If toHaveErrorMessage is used, please update these instances to use the new toHaveAccessibleErrorMessage matcher 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.

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