Skip to content

Commit ef0c1a3

Browse files
committed
parse-community#8845 test file refactored and unused field option removed
1 parent 526944b commit ef0c1a3

File tree

2 files changed

+4
-12
lines changed

2 files changed

+4
-12
lines changed

spec/ParseLiveQueryServer.spec.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ describe('ParseLiveQueryServer', function () {
356356
// Make sure we add subscriptionInfo to the client
357357
const args = client.addSubscriptionInfo.calls.first().args;
358358
expect(args[0]).toBe(requestId);
359-
expect(args[1].fields).toBe(query.fields);
359+
expect(args[1].keys).toBe(query.keys);
360360
expect(args[1].sessionToken).toBe(request.sessionToken);
361361
// Make sure we send subscribe response to the client
362362
expect(client.pushSubscribe).toHaveBeenCalledWith(requestId);
@@ -417,7 +417,7 @@ describe('ParseLiveQueryServer', function () {
417417
// Make sure we add subscriptionInfo to the client 2
418418
args = clientAgain.addSubscriptionInfo.calls.mostRecent().args;
419419
expect(args[0]).toBe(requestIdAgain);
420-
expect(args[1].fields).toBe(queryAgain.fields);
420+
expect(args[1].keys).toBe(queryAgain.keys);
421421
});
422422

423423
it('can handle unsubscribe command without clientId', function () {
@@ -1081,7 +1081,7 @@ describe('ParseLiveQueryServer', function () {
10811081
done();
10821082
});
10831083

1084-
it('can handle create command with fields', async done => {
1084+
it('can handle create command with keys', async done => {
10851085
jasmine.restoreLibrary('../lib/LiveQuery/Client', 'Client');
10861086
const Client = require('../lib/LiveQuery/Client').Client;
10871087
const parseLiveQueryServer = new ParseLiveQueryServer({});
@@ -1131,7 +1131,7 @@ describe('ParseLiveQueryServer', function () {
11311131
done();
11321132
});
11331133

1134-
it('can deprecate fields', async () => {
1134+
xit('can deprecate fields', async () => {
11351135
const Deprecator = require('../lib/Deprecator/Deprecator');
11361136
const spy = spyOn(Deprecator, 'logRuntimeDeprecation').and.callFake(() => {});
11371137
jasmine.restoreLibrary('../lib/LiveQuery/Client', 'Client');

src/LiveQuery/ParseLiveQueryServer.js

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ import { LRUCache as LRU } from 'lru-cache';
2323
import UserRouter from '../Routers/UsersRouter';
2424
import DatabaseController from '../Controllers/DatabaseController';
2525
import { isDeepStrictEqual } from 'util';
26-
import Deprecator from '../Deprecator/Deprecator';
2726
import deepcopy from 'deepcopy';
2827

2928
class ParseLiveQueryServer {
@@ -920,13 +919,6 @@ class ParseLiveQueryServer {
920919
? request.query.keys
921920
: request.query.keys.split(',');
922921
}
923-
if (request.query.fields) {
924-
subscriptionInfo.keys = request.query.fields;
925-
Deprecator.logRuntimeDeprecation({
926-
usage: `Subscribing using fields parameter`,
927-
solution: `Subscribe using "keys" instead.`,
928-
});
929-
}
930922
if (request.query.watch) {
931923
subscriptionInfo.watch = request.query.watch;
932924
}

0 commit comments

Comments
 (0)