- Instalaciones:
yarn add --dev jest babel-jest @babel/preset-env @babel/preset-react
yarn add --dev @testing-library/react @types/jest jest-environment-jsdom
- Opcional: Si usamos Fetch API en el proyecto:
"imagenes": { | |
"prefix": "pic", | |
"body": [ | |
"<picture>", | |
"<source", | |
"\t sizes=\"1920w, 1280w, 640w\" ", | |
"\t srcset=\"img/imagen.avif 1920w, \n\t\t\t img/imagen-1280.avif 1280w, \n\t\t\t img/imagen-640.avif 640w\" ", | |
"\t type=\"image/avif\">", | |
"<source", | |
"\t sizes=\"1920w, 1280w, 640w\" ", |