- Instalaciones:
npm i --save-dev jest babel-jest @babel/preset-env @babel/preset-react
npm i --save-dev @testing-library/react @types/jest jest-environment-jsdom
- Opcional: Si usamos Fetch API en el proyecto:
npm i --save-dev jest babel-jest @babel/preset-env @babel/preset-react
npm i --save-dev @testing-library/react @types/jest jest-environment-jsdom
import { createSlice } from '@reduxjs/toolkit'; | |
export const templateSlice = createSlice({ | |
name: 'name', | |
initialState: { | |
counter: 10 | |
}, | |
reducers: { | |
increment: (state, /* action */ ) => { | |
//! https://react-redux.js.org/tutorials/quick-start |