Skip to content

Instantly share code, notes, and snippets.

@alanhg
Created October 2, 2019 14:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alanhg/cfe4d2e3ed6200669dc4e15455627c51 to your computer and use it in GitHub Desktop.
Save alanhg/cfe4d2e3ed6200669dc4e15455627c51 to your computer and use it in GitHub Desktop.
export default class SagaSpecFactory {
static getAPIStub(apiMethodFunc: any, response: object): any {
return ({ fn, args }, next) => {
if (fn === apiMethodFunc) {
return response;
}
return next();
};
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment