Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
beforeEach(() => {
createGraphqlMockServer(xhrMock, {
operationsByTarget: {
mc: mocksForMc.createMockOperations({
FetchLoggedInUser: {
me: new ApolloError('Oops'),
},
}),
},
});
});
it('should render error page', async () => {
constructor(collection) {
super()
if (!isCollectionOrModel(collection)) {
throw new ApolloError(
'MongoDataSource constructor must be given a collection or Mongoose model'
)
}
if (isModel(collection)) {
this.model = collection
this.collection = this.model.collection
} else {
this.collection = collection
}
}
await StripeSubscription.editSubscription({
userId: identity.id,
active: false,
stripeSourceId: null,
stripeSubscriptionId: null,
expiryMonth: null,
expiryYear: null,
last4: null,
brand: null
});
return { active: false };
} catch (e) {
log.error(e);
if (e.code === 'resource_missing') {
throw new ApolloError(e.message, e.code);
}
throw new Error(e.message);
}
})
},