- 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:
import colors from 'colors' | |
import server from './server' | |
const port = process.env.PORT || 4000 | |
server.listen(port, () => { | |
console.log( colors.cyan.bold( `REST API en el puerto ${port}`)) | |
}) |
(function (document) { | |
var checkCount = 0, | |
formatFound = false; | |
function setHTMLClass(height, className) { | |
checkCount++; | |
if (height == 2) { | |
formatFound = true; | |
document.documentElement.className += " " + className; | |
} else { |
"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\" ", |