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