We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c9f46e8 commit 969e43bCopy full SHA for 969e43b
spec/CloudCode.spec.js
@@ -3225,9 +3225,15 @@ describe('afterLogin hook', () => {
3225
await query.find({ context: { a: 'a' } });
3226
});
3227
3228
- it('afterFind should have access to context while making fetch call', async () => {
+ it('beforeFine and afterFind should have access to context while making fetch call', async () => {
3229
+ Parse.Cloud.beforeFind('TestObject', req => {
3230
+ expect(req.context.a).toEqual('a');
3231
+ expect(req.context.b).to.not.exist;
3232
+ req.context.b = 'b';
3233
+ });
3234
Parse.Cloud.afterFind('TestObject', req => {
3235
expect(req.context.a).toEqual('a');
3236
+ expect(req.context.b).toEqual('b');
3237
3238
const obj = new TestObject();
3239
await obj.save();
0 commit comments