Last active
January 20, 2019 20:43
-
-
Save shlomokraus/934f10fddd2e98922acb1ed7de8a4790 to your computer and use it in GitHub Desktop.
Example of mockshot output for UserService
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
| export class UserServiceMocks { | |
| static getUser(mock: "success"): any { | |
| switch (mock) { | |
| case "success": | |
| return { | |
| "email": "[email protected]", | |
| "id": "abc", | |
| "name": "Some Name" | |
| } | |
| default: | |
| throw Error("Unknown mock: "+mock); | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment