Created
February 20, 2020 02:17
-
-
Save Farenheith/f16a80e946adc7fdb3aa3dab08b4ff63 to your computer and use it in GitHub Desktop.
Example of wrapper making untestable function testable
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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