Skip to content

Instantly share code, notes, and snippets.

View CPatchane's full-sized avatar
💻

Cédric Patchane CPatchane

💻
View GitHub Profile
@CPatchane
CPatchane / RetoursExpCozyJest.md
Created April 12, 2018 15:29
Retours d'expériences de l'utilisation de Jest chez Cozy (Platformers)

Quelques retours d'expériences Jest

Les slides du talk Jest: https://github.com/CPatchane/jest-talk

Utilisation des snapshots

Important : le snapshoting n'est pas réservé aux tests de composants

Des snapshots pour ne pas avoir à modifier son codebase de tests à chaque fix, chaque mise à jour ou chaque changement. Les snapshots sont mis à jour et non la codebase.

@CPatchane
CPatchane / updateImageExif.js
Last active May 3, 2024 15:41
getaround-tech-blog_exif-data-manipulation-javascript
// Gist used for this getaround tech article: https://getaround.tech/exif-data-manipulation-javascript/
const getUpdatedImage = (image, onReady) => {
const reader = new FileReader()
reader.addEventListener("load", ({ target }) => {
if (!target) throw new Error("no blob found")
const { result: buffer } = target
if (!buffer || typeof buffer === "string") {
throw new Error("not a valid JPEG")
}