Last active
March 19, 2020 05:54
-
-
Save PurpleBooth/447232258bcb24b94dc23bb0bf25a890 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
// Create an object with hollow methods (does not need to implement everything) | |
const myTestDouble = { | |
exampleMethod: (): any => { | |
} | |
} as RealClass; | |
// Then to return something | |
spyOn(myTestDouble, 'exampleMethod').and.returnValue("Stubbed Value"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment