Skip to content

Instantly share code, notes, and snippets.

@PCreations
Created September 3, 2020 13:45
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 PCreations/4d70f1ae8db762d9ee4caa38fde032a4 to your computer and use it in GitHub Desktop.
Save PCreations/4d70f1ae8db762d9ee4caa38fde032a4 to your computer and use it in GitHub Desktop.
const fakeSendQuery = (articlesForDomain) => (request) =>
Promise.resolve({
data: {
data: {
latestArticles: articlesForDomain[request.headers.domain],
},
},
});
export const createFakeExecuteLatestArticlesQuery = (articlesForDomain) =>
createExecuteLatestArticlesQuery({
sendQuery: fakeSendQuery(articlesForDomain),
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment