Skip to content

Instantly share code, notes, and snippets.

@Farenheith
Created February 20, 2020 02:17
Show Gist options
  • Save Farenheith/f16a80e946adc7fdb3aa3dab08b4ff63 to your computer and use it in GitHub Desktop.
Save Farenheith/f16a80e946adc7fdb3aa3dab08b4ff63 to your computer and use it in GitHub Desktop.
Example of wrapper making untestable function testable
import untestableOldFunction = require('untestable-old-function');
export const nowTestableOldFunction = untestableOldFunction as (p: number) => string;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment