chore: Fixes issue related to flow types (#4724)
* Fixes issue related to flow types * Improves type inference on where clause, index * run parse-server start on liveQueryServer only on mongo, state leaks on postgres
This commit is contained in:
@@ -102,46 +102,47 @@ describe('ParseLiveQueryServer', function() {
|
||||
parseLiveQueryServer.server.close(done);
|
||||
});
|
||||
|
||||
it('can be initialized through ParseServer without liveQueryServerOptions', function(done) {
|
||||
const parseServer = ParseServer.start({
|
||||
appId: 'hello',
|
||||
masterKey: 'world',
|
||||
port: 22345,
|
||||
mountPath: '/1',
|
||||
serverURL: 'http://localhost:12345/1',
|
||||
liveQuery: {
|
||||
classNames: ['Yolo']
|
||||
},
|
||||
startLiveQueryServer: true
|
||||
describe_only_db('mongo')('initialization', () => {
|
||||
it('can be initialized through ParseServer without liveQueryServerOptions', function(done) {
|
||||
const parseServer = ParseServer.start({
|
||||
appId: 'hello',
|
||||
masterKey: 'world',
|
||||
port: 22345,
|
||||
mountPath: '/1',
|
||||
serverURL: 'http://localhost:12345/1',
|
||||
liveQuery: {
|
||||
classNames: ['Yolo']
|
||||
},
|
||||
startLiveQueryServer: true
|
||||
});
|
||||
|
||||
expect(parseServer.liveQueryServer).not.toBeUndefined();
|
||||
expect(parseServer.liveQueryServer.server).toBe(parseServer.server);
|
||||
parseServer.server.close(() => done());
|
||||
});
|
||||
|
||||
expect(parseServer.liveQueryServer).not.toBeUndefined();
|
||||
expect(parseServer.liveQueryServer.server).toBe(parseServer.server);
|
||||
parseServer.server.close(() => done());
|
||||
});
|
||||
it('can be initialized through ParseServer with liveQueryServerOptions', function(done) {
|
||||
const parseServer = ParseServer.start({
|
||||
appId: 'hello',
|
||||
masterKey: 'world',
|
||||
port: 22346,
|
||||
mountPath: '/1',
|
||||
serverURL: 'http://localhost:12345/1',
|
||||
liveQuery: {
|
||||
classNames: ['Yolo']
|
||||
},
|
||||
liveQueryServerOptions: {
|
||||
port: 22347,
|
||||
}
|
||||
});
|
||||
|
||||
it('can be initialized through ParseServer with liveQueryServerOptions', function(done) {
|
||||
const parseServer = ParseServer.start({
|
||||
appId: 'hello',
|
||||
masterKey: 'world',
|
||||
port: 22346,
|
||||
mountPath: '/1',
|
||||
serverURL: 'http://localhost:12345/1',
|
||||
liveQuery: {
|
||||
classNames: ['Yolo']
|
||||
},
|
||||
liveQueryServerOptions: {
|
||||
port: 22347,
|
||||
}
|
||||
expect(parseServer.liveQueryServer).not.toBeUndefined();
|
||||
expect(parseServer.liveQueryServer.server).not.toBe(parseServer.server);
|
||||
parseServer.liveQueryServer.server.close();
|
||||
parseServer.server.close(() => done());
|
||||
});
|
||||
|
||||
expect(parseServer.liveQueryServer).not.toBeUndefined();
|
||||
expect(parseServer.liveQueryServer.server).not.toBe(parseServer.server);
|
||||
parseServer.liveQueryServer.server.close();
|
||||
parseServer.server.close(() => done());
|
||||
});
|
||||
|
||||
|
||||
it('can handle connect command', function() {
|
||||
const parseLiveQueryServer = new ParseLiveQueryServer(10, 10, {});
|
||||
const parseWebSocket = {
|
||||
|
||||
Reference in New Issue
Block a user