Fix for #1334: using relative cloud code files broken
* Adding tests for absolute and relative cloud code file loading. * Fixes #1334 by resolving relative cloud code file paths to the process' working directory.
This commit is contained in:
committed by
Florent Vilmart
parent
f99b5588ab
commit
acc23d0828
@@ -175,6 +175,26 @@ describe('server', () => {
|
||||
})
|
||||
});
|
||||
|
||||
it('can load absolute cloud code file', done => {
|
||||
setServerConfiguration({
|
||||
serverURL: 'http://localhost:8378/1',
|
||||
appId: 'test',
|
||||
masterKey: 'test',
|
||||
cloud: __dirname + '/cloud/main.js'
|
||||
});
|
||||
done();
|
||||
});
|
||||
|
||||
it('can load relative cloud code file', done => {
|
||||
setServerConfiguration({
|
||||
serverURL: 'http://localhost:8378/1',
|
||||
appId: 'test',
|
||||
masterKey: 'test',
|
||||
cloud: './spec/cloud/main.js'
|
||||
});
|
||||
done();
|
||||
});
|
||||
|
||||
it('can create a parse-server', done => {
|
||||
var parseServer = new ParseServer.default({
|
||||
appId: "aTestApp",
|
||||
|
||||
Reference in New Issue
Block a user