We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2230072 commit d2a5641Copy full SHA for d2a5641
integration/test/ParseLiveQueryTest.js
@@ -221,4 +221,23 @@ describe('Parse LiveQuery', () => {
221
done();
222
})
223
});
224
+
225
+ it('can subscribe to query with fields', async (done) => {
226
+ const object = new TestObject();
227
+ await object.save({ name: 'hello', age: 21 });
228
229
+ const query = new Parse.Query(TestObject);
230
+ query.equalTo('objectId', object.id);
231
+ query.select(['name']);
232
+ const subscription = await query.subscribe();
233
234
+ subscription.on('update', (object) => {
235
+ assert.equal(object.get('name'), 'hello');
236
+ assert.equal(object.get('age'), undefined)
237
+ assert.equal(object.get('foo'), undefined);
238
+ done();
239
+ })
240
+ object.set({ foo: 'bar' });
241
+ await object.save();
242
+ });
243
0 commit comments