perf: Add details to error message in Parse.Query.aggregate (#9689)

This commit is contained in:
Diamond Lewis
2025-04-07 14:54:18 -05:00
committed by GitHub
parent 9d8d494782
commit 9de6999e25
3 changed files with 34 additions and 11 deletions

View File

@@ -1500,4 +1500,24 @@ describe('Parse.Query Aggregate testing', () => {
expect(results.length).toEqual(3);
await database.adapter.deleteAllClasses(false);
});
it_only_db('mongo')('aggregate handle mongodb errors', async () => {
const pipeline = [
{
$search: {
index: "default",
text: {
path: ["name"],
query: 'foo',
},
},
},
];
try {
await new Parse.Query(TestObject).aggregate(pipeline);
fail();
} catch (e) {
expect(e.code).toBe(Parse.Error.INVALID_QUERY);
}
});
});

View File

@@ -22,6 +22,8 @@ const flakyTests = [
"Email Verification Token Expiration: sets the _email_verify_token_expires_at and _email_verify_token fields after user SignUp",
// Expected 0 to be 1.
"Email Verification Token Expiration: should send a new verification email when a resend is requested and the user is UNVERIFIED",
// Expected 0 to be 1.
"Email Verification Token Expiration: should match codes with emailVerifyTokenReuseIfValid",
];
/** The minimum execution time in seconds for a test to be considered slow. */