Skip to content

chore(toolkit): remove unnecessary areErrorsEqual function#5216

Merged
EskiMojo14 merged 1 commit intoreduxjs:masterfrom
aryaemami59:chore/toolkit/remove-areErrorsEqual
Feb 6, 2026
Merged

chore(toolkit): remove unnecessary areErrorsEqual function#5216
EskiMojo14 merged 1 commit intoreduxjs:masterfrom
aryaemami59:chore/toolkit/remove-areErrorsEqual

Conversation

@aryaemami59
Copy link
Member

Overview

vitest already internally uses an error-comparison helper, isErrorEqual, so our local areErrorsEqual equality-tester is redundant.

isErrorEqual was introduced upstream in vitest-dev/vitest#5876 and covers our use case (including correctly differentiating error types). With the current version of vitest, the tests fail if we swap (for example) a TypeError for an Error, which matches the behavior we want and confirms we can safely remove areErrorsEqual without changing test intent.

This PR:

  • Removes the unnecessary areErrorsEqual equality-tester.

Additional Notes

@aryaemami59 aryaemami59 self-assigned this Feb 6, 2026
@aryaemami59 aryaemami59 added the RTK-Query Issues related to Redux-Toolkit-Query label Feb 6, 2026
@codesandbox
Copy link

codesandbox bot commented Feb 6, 2026

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview

@codesandbox-ci
Copy link

codesandbox-ci bot commented Feb 6, 2026

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit d4604cc:

Sandbox Source
@examples-query-react/basic Configuration
@examples-query-react/advanced Configuration
@examples-action-listener/counter Configuration
rtk-esm-cra Configuration

@netlify
Copy link

netlify bot commented Feb 6, 2026

Deploy Preview for redux-starter-kit-docs ready!

Name Link
🔨 Latest commit d4604cc
🔍 Latest deploy log https://app.netlify.com/projects/redux-starter-kit-docs/deploys/698612c9236ccc000893090e
😎 Deploy Preview https://deploy-preview-5216--redux-starter-kit-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@EskiMojo14 EskiMojo14 merged commit ec0e825 into reduxjs:master Feb 6, 2026
47 checks passed
@aryaemami59 aryaemami59 deleted the chore/toolkit/remove-areErrorsEqual branch February 6, 2026 16:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

RTK-Query Issues related to Redux-Toolkit-Query

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants