Skip to content

Commit

Permalink
updated comment & fix pausify
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelolo24 committed Aug 27, 2020
1 parent 0485a73 commit 62aead1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ interface Metadata<T> {
}

/**
* A simple mock dataAccessLayer that allows you to manually pause and resume a request.
* A simple mock dataAccessLayer that allows you to control whether a request comes back with data or empty.
*/
export function emptifyMock<T>(
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,13 @@ export function pausifyMock<T>({
}
},
resume: (pausableRequests: PausableRequests | PausableRequests[]) => {
const resumeRelatedEventsRequest = pausableRequests.includes('relatedEvents');
const resumeResolverTreeRequest = pausableRequests.includes('resolverTree');
const resumeEntitiesRequest = pausableRequests.includes('entities');
const resumeResolverTreeRequest = pausableRequests.includes('resolverTree');
const resumeRelatedEventsRequest = pausableRequests.includes('relatedEvents');

if (resumeRelatedEventsRequest && entitiesResolver) entitiesResolver();
if (resumeEntitiesRequest && entitiesResolver) entitiesResolver();
if (resumeResolverTreeRequest && resolverTreeResolver) resolverTreeResolver();
if (resumeEntitiesRequest && relatedEventsResolver) relatedEventsResolver();
if (resumeRelatedEventsRequest && relatedEventsResolver) relatedEventsResolver();
},
dataAccessLayer: {
/**
Expand Down

0 comments on commit 62aead1

Please sign in to comment.