@@ -1131,61 +1131,6 @@ describe('ParseLiveQueryServer', function () {
1131
1131
done ( ) ;
1132
1132
} ) ;
1133
1133
1134
- xit ( 'can deprecate fields' , async ( ) => {
1135
- const Deprecator = require ( '../lib/Deprecator/Deprecator' ) ;
1136
- const spy = spyOn ( Deprecator , 'logRuntimeDeprecation' ) . and . callFake ( ( ) => { } ) ;
1137
- jasmine . restoreLibrary ( '../lib/LiveQuery/Client' , 'Client' ) ;
1138
- const Client = require ( '../lib/LiveQuery/Client' ) . Client ;
1139
- const parseLiveQueryServer = new ParseLiveQueryServer ( { } ) ;
1140
- // Make mock request message
1141
- const message = generateMockMessage ( ) ;
1142
-
1143
- const clientId = 1 ;
1144
- const parseWebSocket = {
1145
- clientId,
1146
- send : jasmine . createSpy ( 'send' ) ,
1147
- } ;
1148
- const client = new Client ( clientId , parseWebSocket ) ;
1149
- spyOn ( client , 'pushCreate' ) . and . callThrough ( ) ;
1150
- parseLiveQueryServer . clients . set ( clientId , client ) ;
1151
-
1152
- // Add mock subscription
1153
- const requestId = 2 ;
1154
- const query = {
1155
- className : testClassName ,
1156
- where : {
1157
- key : 'value' ,
1158
- } ,
1159
- fields : [ 'test' ] ,
1160
- } ;
1161
- await addMockSubscription ( parseLiveQueryServer , clientId , requestId , parseWebSocket , query ) ;
1162
- // Mock _matchesSubscription to return matching
1163
- parseLiveQueryServer . _matchesSubscription = function ( parseObject ) {
1164
- if ( ! parseObject ) {
1165
- return false ;
1166
- }
1167
- return true ;
1168
- } ;
1169
- parseLiveQueryServer . _matchesACL = function ( ) {
1170
- return Promise . resolve ( true ) ;
1171
- } ;
1172
-
1173
- parseLiveQueryServer . _onAfterSave ( message ) ;
1174
-
1175
- // Make sure we send create command to client
1176
- await timeout ( ) ;
1177
-
1178
- expect ( client . pushCreate ) . toHaveBeenCalled ( ) ;
1179
- const args = parseWebSocket . send . calls . mostRecent ( ) . args ;
1180
- const toSend = JSON . parse ( args [ 0 ] ) ;
1181
- expect ( toSend . object ) . toBeDefined ( ) ;
1182
- expect ( toSend . original ) . toBeUndefined ( ) ;
1183
- expect ( spy ) . toHaveBeenCalledWith ( {
1184
- usage : 'Subscribing using fields parameter' ,
1185
- solution : `Subscribe using "keys" instead.` ,
1186
- } ) ;
1187
- } ) ;
1188
-
1189
1134
it ( 'can handle create command with watch' , async ( ) => {
1190
1135
jasmine . restoreLibrary ( '../lib/LiveQuery/Client' , 'Client' ) ;
1191
1136
const Client = require ( '../lib/LiveQuery/Client' ) . Client ;
0 commit comments