@@ -201,7 +201,7 @@ describe('Cloud Code', () => {
201
201
}
202
202
} ) ;
203
203
204
- it ( 'beforeFind can short circuit ' , async ( ) => {
204
+ it ( 'beforeFind can return object without DB operation ' , async ( ) => {
205
205
Parse . Cloud . beforeFind ( 'beforeFind' , ( ) => {
206
206
return new Parse . Object ( 'TestObject' , { foo : 'bar' } ) ;
207
207
} ) ;
@@ -215,7 +215,7 @@ describe('Cloud Code', () => {
215
215
expect ( newObj . toJSON ( ) ) . toEqual ( { foo : 'bar' } ) ;
216
216
} ) ;
217
217
218
- it ( 'beforeFind can short circuit arrays ' , async ( ) => {
218
+ it ( 'beforeFind can return array of objects without DB operation ' , async ( ) => {
219
219
Parse . Cloud . beforeFind ( 'beforeFind' , ( ) => {
220
220
return [ new Parse . Object ( 'TestObject' , { foo : 'bar' } ) ] ;
221
221
} ) ;
@@ -229,7 +229,7 @@ describe('Cloud Code', () => {
229
229
expect ( newObj . toJSON ( ) ) . toEqual ( { foo : 'bar' } ) ;
230
230
} ) ;
231
231
232
- it ( 'beforeFind can short circuit get' , async ( ) => {
232
+ it ( 'beforeFind can return object for get query without DB operation ' , async ( ) => {
233
233
Parse . Cloud . beforeFind ( 'beforeFind' , ( ) => {
234
234
return [ new Parse . Object ( 'TestObject' , { foo : 'bar' } ) ] ;
235
235
} ) ;
@@ -243,7 +243,7 @@ describe('Cloud Code', () => {
243
243
expect ( newObj . toJSON ( ) ) . toEqual ( { foo : 'bar' } ) ;
244
244
} ) ;
245
245
246
- it ( 'beforeFind can short circuit empty array' , async ( ) => {
246
+ it ( 'beforeFind can return empty array without DB operation ' , async ( ) => {
247
247
Parse . Cloud . beforeFind ( 'beforeFind' , ( ) => {
248
248
return [ ] ;
249
249
} ) ;
0 commit comments