Inquiry About Testing Data Transmission and Reception with Parse Server Using Jest

Dear Parse Server Community,

I hope this message finds you well. I am currently working on a project that involves interacting with a Parse Server backend, and I am seeking guidance on how to effectively test data transmission and reception using Jest.

I thought that jest testing would be possible by simply converting data transmission and reception to the parse server or login/logout processing into functions. However, I found that parse-related queries do not work within the jest test syntax.

The main errors are as follows:

TypeError: Cannot read properties of undefined (reading ‘length’) at Object.request (…\node_modules\parse\lib\browser\RESTController.js:236:17)

// …\node_modules\parse\lib\browser\RESTController.js
…
request: function request(method /: string/, path /: string/, data /: mixed/, options /:: ?: RequestOptions/) {
options = options || {};
var url = _CoreManager.default.get(‘SERVER_URL’);
if (url[url.length - 1] !== ‘/’) { <= hear
url += ‘/’;
}
url += path;
…

If you have any insights, recommendations, or resources related to testing Parse Server interactions with Jest, I would greatly appreciate your input. Additionally, if you could share any examples or code snippets illustrating testing practices, it would be immensely helpful.

Thank you very much for your time and assistance. I look forward to hearing from you soon.

Best regards,

Please show an example of how you try to access the Parse backend in your test code.