Skip to content

Instantly share code, notes, and snippets.

@shlomokraus
Last active January 20, 2019 20:43
Show Gist options
  • Select an option

  • Save shlomokraus/934f10fddd2e98922acb1ed7de8a4790 to your computer and use it in GitHub Desktop.

Select an option

Save shlomokraus/934f10fddd2e98922acb1ed7de8a4790 to your computer and use it in GitHub Desktop.
Example of mockshot output for UserService
export class UserServiceMocks {
static getUser(mock: "success"): any {
switch (mock) {
case "success":
return {
"email": "test@iqoqo.co",
"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