But I think you gave me a path to understand the issue, which is likely to be the same root issue from Schema mismatch, expected Pointer - #4 by davimacedo.
If I do a console.log(Parse.Cloud);
on my cloud/endpoints/main.ts
I get this:
{
run: [Function: run],
getJobsData: [Function: getJobsData],
startJob: [Function: startJob],
getJobStatus: [Function: getJobStatus],
useMasterKey: [Function (anonymous)],
define: [Function (anonymous)],
job: [Function (anonymous)],
beforeSave: [Function (anonymous)],
beforeDelete: [Function (anonymous)],
beforeLogin: [Function (anonymous)],
afterLogin: [Function (anonymous)],
afterLogout: [Function (anonymous)],
afterSave: [Function (anonymous)],
afterDelete: [Function (anonymous)],
beforeFind: [Function (anonymous)],
afterFind: [Function (anonymous)],
beforeSaveFile: [Function (anonymous)],
afterSaveFile: [Function (anonymous)],
beforeDeleteFile: [Function (anonymous)],
afterDeleteFile: [Function (anonymous)],
beforeConnect: [Function (anonymous)],
beforeSubscribe: [Function (anonymous)],
onLiveQueryEvent: [Function (anonymous)],
afterLiveQueryEvent: [Function (anonymous)],
_removeAllHooks: [Function (anonymous)],
httpRequest: [Function: httpRequest] { encodeBody: [Function: encodeBody] }
}
if I do
import * as Parse from 'parse/node';
console.log(Parse.Cloud);
I get
getJobStatus: [Function: getJobStatus],
getJobsData: [Function: getJobsData],
run: [Function: run],
startJob: [Function: startJob],
useMasterKey: [Function (anonymous)]
}
So apparently I’m mixing up server and client imports and that breaks stuff. This explains why I have problems with Jest, which includes some auxiliary server code directly but works as a client.
So if I’m sharing code between server and client, like with Jest, how should I do it?