-
-
Save gasserkl/f1567725e60c9fcc4090439439f6aa70 to your computer and use it in GitHub Desktop.
This file contains 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
function setup(...args) { | |
const returnVal = {}; | |
function ComponentHarness() { | |
// change the object referenced by returnVal, otherwise we would lose the reference in the outer scope and could not make assertions on the values returned by the hook | |
Object.assign(returnVal, myCustomHook(...args)); | |
return null; | |
} | |
render(<ComponentHarness />); | |
return returnVal; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment