Skip to content

Conversation

@renovate
Copy link
Contributor

@renovate renovate bot commented Oct 10, 2023

This PR contains the following updates:

Package Change Age Confidence
redux-mock-store 1.5.4 -> 1.5.5 age confidence
@types/redux-mock-store (source) 1.0.3 -> 1.5.0 age confidence

Release Notes

arnaudbenard/redux-mock-store (redux-mock-store)

v1.5.5: - Deprecation

Compare Source

This patch release deprecates the configureStore method, as this package does not align with the Redux team's recommended testing practices. Instead, we recommend testing with a real store.

Testing with a mock store leads to potentially confusing behaviour, such as state not updating when actions are dispatched. Additionally, it's a lot less useful to assert on the actions dispatched rather than the observable state changes.

You can test the entire combination of action creators, reducers, and selectors in a single test, for example:

it('should add a todo', () => {
  const store = makeStore() // a user defined reusable store factory

  store.dispatch(addTodo('Use Redux'))

  expect(selectTodos(store.getState())).toEqual([
    { text: 'Use Redux', completed: false }
  ])
})

This avoids common pitfalls of testing each of these in isolation, such as mocked state shape becoming out of sync with the actual application.

legacy_configureStore

We recognise that for many codebases, migration will be a major effort that some may not be able to allocate time for.
The @deprecated tag is just a visual strikethrough, but some tools will add extra warnings when it is used.

We now have a legacy_configureStore export (similar to legacy_createStore in Redux core) which is the same function but without this tag. You can change any imports to use this if the deprecation notice presents significant issues for you.

- import configureStore from "redux-mock-store"
+ import { legacy_configureStore as configureStore } from "redux-mock-store"

// or

- import { configureStore } from "redux-mock-store"
+ import { legacy_configureStore as configureStore } from "redux-mock-store"

Full Changelog: reduxjs/redux-mock-store@v1.5.4...v1.5.5


Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about these updates again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate bot changed the title chore(deps): update dependency @types/redux-mock-store to v1.0.4 chore(deps): update dependency @types/redux-mock-store to v1.0.5 Oct 18, 2023
@renovate renovate bot force-pushed the renovate/redux-mock-store-1.x branch from e2b2b1e to b7c314b Compare October 18, 2023 14:06
@renovate renovate bot changed the title chore(deps): update dependency @types/redux-mock-store to v1.0.5 chore(deps): update dependency @types/redux-mock-store to v1.0.6 Nov 7, 2023
@renovate renovate bot force-pushed the renovate/redux-mock-store-1.x branch from b7c314b to 415d59d Compare November 7, 2023 23:32
@renovate renovate bot changed the title chore(deps): update dependency @types/redux-mock-store to v1.0.6 chore(deps): update dependency redux-mock-store to v1.5.5 Oct 21, 2024
@renovate renovate bot force-pushed the renovate/redux-mock-store-1.x branch from 415d59d to 461daec Compare October 21, 2024 14:30
@renovate renovate bot force-pushed the renovate/redux-mock-store-1.x branch from 461daec to d2073d1 Compare November 18, 2024 13:47
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.

1 participant