Skip to content

Instantly share code, notes, and snippets.

View DavidPerezHz's full-sized avatar

David Pérez Hdez DavidPerezHz

View GitHub Profile
@DavidPerezHz
DavidPerezHz / vite-testing-config.md
Created March 20, 2024 05:26 — forked from Klerith/vite-testing-config.md
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:
@DavidPerezHz
DavidPerezHz / input.html
Last active June 19, 2022 21:40
Validar solo números para FIREFOX - (event=keyup) input type number
<style>
input[type=number] {
-moz-appearance: textfield; /*Simula el campo input number a un campo de texto, remueve la apariencia inner-spin-button & outer-spin-button*/
}
</style>
<input type="number" id="boletos" name="txtCompanion">
<script>