@@ -201,7 +201,7 @@ describe('Cloud Code', () => {
201201 }
202202 } ) ;
203203
204- it ( 'beforeFind can short circuit ' , async ( ) => {
204+ it ( 'beforeFind can return object without DB operation ' , async ( ) => {
205205 Parse . Cloud . beforeFind ( 'beforeFind' , ( ) => {
206206 return new Parse . Object ( 'TestObject' , { foo : 'bar' } ) ;
207207 } ) ;
@@ -215,7 +215,7 @@ describe('Cloud Code', () => {
215215 expect ( newObj . toJSON ( ) ) . toEqual ( { foo : 'bar' } ) ;
216216 } ) ;
217217
218- it ( 'beforeFind can short circuit arrays ' , async ( ) => {
218+ it ( 'beforeFind can return array of objects without DB operation ' , async ( ) => {
219219 Parse . Cloud . beforeFind ( 'beforeFind' , ( ) => {
220220 return [ new Parse . Object ( 'TestObject' , { foo : 'bar' } ) ] ;
221221 } ) ;
@@ -229,7 +229,7 @@ describe('Cloud Code', () => {
229229 expect ( newObj . toJSON ( ) ) . toEqual ( { foo : 'bar' } ) ;
230230 } ) ;
231231
232- it ( 'beforeFind can short circuit get' , async ( ) => {
232+ it ( 'beforeFind can return object for get query without DB operation ' , async ( ) => {
233233 Parse . Cloud . beforeFind ( 'beforeFind' , ( ) => {
234234 return [ new Parse . Object ( 'TestObject' , { foo : 'bar' } ) ] ;
235235 } ) ;
@@ -243,7 +243,7 @@ describe('Cloud Code', () => {
243243 expect ( newObj . toJSON ( ) ) . toEqual ( { foo : 'bar' } ) ;
244244 } ) ;
245245
246- it ( 'beforeFind can short circuit empty array' , async ( ) => {
246+ it ( 'beforeFind can return empty array without DB operation ' , async ( ) => {
247247 Parse . Cloud . beforeFind ( 'beforeFind' , ( ) => {
248248 return [ ] ;
249249 } ) ;
0 commit comments