Skip to content

Instantly share code, notes, and snippets.

View remithomas's full-sized avatar

Rémi THOMAS remithomas

View GitHub Profile
@remithomas
remithomas / debounce-jest.ts
Created September 5, 2025 14:43
jest mock debounce
jest.mock('lodash/debounce', () => {
const originalDebounce = jest.requireActual('lodash/debounce')
return jest.fn((func, wait, options) => {
const debounced = originalDebounce(func, wait, options)
debounced.flush = jest.fn(() => originalDebounce(func, 0, options).flush())
debounced.cancel = jest.fn(() => originalDebounce(func, 0, options).cancel())
return debounced
})
})
@remithomas
remithomas / fr-creer_une_pull_requests.md
Last active May 5, 2019 02:21
FR - Créer une Pull Requests

Pull Requests

Titre

Titre simple et clair

Contenu

Description courte et rapide de ce qu’on va trouver dans la PR. Utiliser au maximum le format markdown, une simple liste peut être si explicite !

Illustration

Image

@remithomas
remithomas / httpCodes.js
Created June 27, 2018 13:55
Export http codes
// from https://httpstatuses.com
// 1×× Informational
export const CONTINUE = 100;
export const SWITCHING_PROTOCOLS = 101;
export const PROCESSING = 102;
// 2×× Success
export const OK = 200;
export const CREATED = 201;