Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

152
Visualizações
Jest Store is Mocked -- Not detecting it?

I have some code I've pulled from another project I had done. I am moving the store here and passing the App as a child component.

Unfortunately I receive this error. I'm not sure why this doesn't work.

could not find react-redux context value; please ensure the component is wrapped in a <Provider>

      29 |
      30 | function App() {
    > 31 |   const { userData } = useSelector(state => state.user)

utils.js

import { Provider } from 'react-redux'
import store from "../redux/store"

const ReduxProvider = ({ children }) => (
    <Provider store={store}>{children}</Provider>
)

export {
    ReduxProvider
}

App.test.js

import { render } from '@testing-library/react';

import { ReduxProvider } from './utils'
import App from '../App';

test('renders', () => {
  render(
    <ReduxProvider>
      <App />
    </ReduxProvider>
  );
});
about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda