Skip to content

Instantly share code, notes, and snippets.

View jhonatanrojas's full-sized avatar

Jhonatan Rojas jhonatanrojas

View GitHub Profile
@jhonatanrojas
jhonatanrojas / vite-testing-config.md
Created April 14, 2025 03:29 — forked from Klerith/vite-testing-config.md
Vite + Testing + Jest - Completo

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:
@jhonatanrojas
jhonatanrojas / vite-testing-config.md
Created March 13, 2024 17:19 — 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:
@jhonatanrojas
jhonatanrojas / index.html
Created February 22, 2023 18:06
Multi-Step Form
<div class="modal__container">
<div class="modal">
<div class="modal__form__container">
<form action="" class="form">
<h2>Donate</h2>
<div class="form__step__container">
<div class="form__step">
<h3>Step 1</h3>
<h4>Choose the amount</h4>
<div class="donation-boxes">
@jhonatanrojas
jhonatanrojas / index.html
Created February 22, 2023 18:06
Multi-Step Form
<div class="modal__container">
<div class="modal">
<div class="modal__form__container">
<form action="" class="form">
<h2>Donate</h2>
<div class="form__step__container">
<div class="form__step">
<h3>Step 1</h3>
<h4>Choose the amount</h4>
<div class="donation-boxes">
@jhonatanrojas
jhonatanrojas / readcfdi.php
Created January 18, 2019 00:26 — forked from goedecke/readcfdi.php
Extraer información de CFDI XML facil con simplexml
<?php
$xml = simplexml_load_file('test.xml');
$ns = $xml->getNamespaces(true);
$xml->registerXPathNamespace('c', $ns['cfdi']);
$xml->registerXPathNamespace('t', $ns['tfd']);
//EMPIEZO A LEER LA INFORMACION DEL CFDI E IMPRIMIRLA
foreach ($xml->xpath('//cfdi:Comprobante') as $cfdiComprobante){
echo $cfdiComprobante['version'];