Fix tests
This commit is contained in:
parent
f73b7d4824
commit
ca7a7bcef9
|
@ -2511,31 +2511,28 @@ describe.each([
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
it.each([logicalOperators])(
|
it("should allow nested ors with multiple conditions", async () => {
|
||||||
"should allow nested ors with multiple conditions (with %s as root)",
|
await expectQuery({
|
||||||
async rootOperator => {
|
$or: {
|
||||||
await expectQuery({
|
conditions: [
|
||||||
[rootOperator]: {
|
{
|
||||||
conditions: [
|
$or: {
|
||||||
{
|
conditions: [
|
||||||
$or: {
|
{
|
||||||
conditions: [
|
equal: { ["productCat.name"]: "foo" },
|
||||||
{
|
},
|
||||||
equal: { ["productCat.name"]: "foo" },
|
],
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
notEqual: { ["productCat.name"]: "foo" },
|
|
||||||
},
|
},
|
||||||
],
|
notEqual: { ["productCat.name"]: "foo" },
|
||||||
},
|
},
|
||||||
}).toContainExactly([
|
],
|
||||||
{ name: "foo", productCat: [{ _id: productCatRows[0]._id }] },
|
},
|
||||||
{ name: "bar", productCat: [{ _id: productCatRows[1]._id }] },
|
}).toContainExactly([
|
||||||
// { name: "baz", productCat: undefined }, // TODO
|
{ name: "foo", productCat: [{ _id: productCatRows[0]._id }] },
|
||||||
])
|
{ name: "bar", productCat: [{ _id: productCatRows[1]._id }] },
|
||||||
}
|
// { name: "baz", productCat: undefined }, // TODO
|
||||||
)
|
])
|
||||||
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue