nit
This commit is contained in:
committed by
Florent Vilmart
parent
48ddcdb303
commit
197190fc29
@@ -3684,8 +3684,8 @@ describe('Parse.Query testing', () => {
|
||||
});
|
||||
});
|
||||
|
||||
it("includeAll", (done) => {
|
||||
const child1 = new TestObject({ foo: 'bar', name: 'al' });
|
||||
it('includeAll', (done) => {
|
||||
const child1 = new TestObject({ foo: 'bar', name: 'ac' });
|
||||
const child2 = new TestObject({ foo: 'baz', name: 'flo' });
|
||||
const child3 = new TestObject({ foo: 'bad', name: 'mo' });
|
||||
const parent = new Container({ child1, child2, child3 });
|
||||
@@ -3702,7 +3702,7 @@ describe('Parse.Query testing', () => {
|
||||
equal(result.child1.foo, 'bar');
|
||||
equal(result.child2.foo, 'baz');
|
||||
equal(result.child3.foo, 'bad');
|
||||
equal(result.child1.name, 'al');
|
||||
equal(result.child1.name, 'ac');
|
||||
equal(result.child2.name, 'flo');
|
||||
equal(result.child3.name, 'mo');
|
||||
done();
|
||||
|
||||
@@ -558,6 +558,7 @@ RestQuery.prototype.runCount = function() {
|
||||
});
|
||||
};
|
||||
|
||||
// Augments this.response with all pointers on an object
|
||||
RestQuery.prototype.handleIncludeAll = function() {
|
||||
if (!this.includeAll) {
|
||||
return;
|
||||
@@ -575,6 +576,7 @@ RestQuery.prototype.handleIncludeAll = function() {
|
||||
}
|
||||
// Add fields to include, keys, remove dups
|
||||
this.include = [...new Set([...this.include, ...includeFields])];
|
||||
// if this.keys not set, then all keys are already included
|
||||
if (this.keys) {
|
||||
this.keys = [...new Set([...this.keys, ...keyFields])];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user