Skip to content

Commit 8b54a05

Browse files
committed
simplify tests
1 parent 9433c00 commit 8b54a05

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

spec/ParseQuery.Aggregate.spec.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1513,8 +1513,11 @@ describe('Parse.Query Aggregate testing', () => {
15131513
},
15141514
},
15151515
];
1516-
await expectAsync(new Parse.Query(TestObject).aggregate(pipeline)).toBeRejectedWith(
1517-
new Parse.Error(Parse.Error.INVALID_QUERY, 'Using $search and $vectorSearch aggregation stages requires additional configuration. Please connect to Atlas or an AtlasCLI local deployment to enable.For more information on how to connect, see https://dochub.mongodb.org/core/atlas-cli-deploy-local-reqs.')
1518-
);
1516+
try {
1517+
await new Parse.Query(TestObject).aggregate(pipeline);
1518+
fail();
1519+
} catch (e) {
1520+
expect(e.code).toBe(Parse.Error.INVALID_QUERY);
1521+
}
15191522
});
15201523
});

0 commit comments

Comments
 (0)