Support direct access server option (#5550)
* Support direct access config test options * add test * fix test * fix definitions * improve docs * Update .travis.yml * Revert "Update .travis.yml" This reverts commit 407f1384953b64bad9e63068db8564c3584ca3a4.
This commit is contained in:
@@ -498,6 +498,16 @@ describe('server', () => {
|
||||
.catch(done.fail);
|
||||
});
|
||||
|
||||
it('should allow direct access', async () => {
|
||||
const RESTController = Parse.CoreManager.getRESTController();
|
||||
const spy = spyOn(Parse.CoreManager, 'setRESTController').and.callThrough();
|
||||
await reconfigureServer({
|
||||
directAccess: true,
|
||||
});
|
||||
expect(spy).toHaveBeenCalledTimes(1);
|
||||
Parse.CoreManager.setRESTController(RESTController);
|
||||
});
|
||||
|
||||
it('should load a middleware from string', done => {
|
||||
reconfigureServer({
|
||||
middleware: 'spec/support/CustomMiddleware',
|
||||
|
||||
Reference in New Issue
Block a user