Skip to content

Commit 5d4a8db

Browse files
IGNT-70 Add more test cases for $everything
1 parent e3050cf commit 5d4a8db

File tree

3 files changed

+1687
-33
lines changed

3 files changed

+1687
-33
lines changed

src/tests/customMatchers.js

+7-2
Original file line numberDiff line numberDiff line change
@@ -765,9 +765,14 @@ function toHaveMongoQuery(resp, expected, expectedTagPath = null) {
765765
}
766766
});
767767

768+
let splitDelimiter = ','
769+
if (!expectedCollections.includes(splitDelimiter)){
770+
splitDelimiter = "|"
771+
}
772+
768773
// Compare query collections
769-
expect(receivedCollections.replace(/[[\]]/g, '').split('|').sort()).toEqual(
770-
expectedCollections.replace(/[[\]]/g, '').split('|').sort()
774+
expect(receivedCollections.replace(/[[\]]/g, '').split(splitDelimiter).sort()).toEqual(
775+
expectedCollections.replace(/[[\]]/g, '').split(splitDelimiter).sort()
771776
);
772777

773778
let receivedQueryOptions = "";

0 commit comments

Comments
 (0)