Skip to content

Instantly share code, notes, and snippets.

View 4drian-sanchez's full-sized avatar

Adrian Sanchez 4drian-sanchez

View GitHub Profile
@Klerith
Klerith / vite-testing-config.md
Last active September 12, 2024 20:06
Vite + Jest + React Testing Library - Configuraciones a seguir

Instalación y configuracion de Jest + React Testing Library

En proyectos de React + Vite

  1. Instalaciones:
yarn add --dev jest babel-jest @babel/preset-env @babel/preset-react 
yarn add --dev @testing-library/react @types/jest jest-environment-jsdom
  1. Opcional: Si usamos Fetch API en el proyecto:
@codigoconjuan
codigoconjuan / gist:30973f8e5e7d210e0458bc49a55ad2c4
Last active February 26, 2024 22:24
Gist para Imágenes HTML5 con AVIF, webp y JPG
"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\" ",