Lint
This commit is contained in:
parent
32702f2e9d
commit
44a053ee08
|
@ -2771,37 +2771,37 @@ describe.each([
|
||||||
})
|
})
|
||||||
|
|
||||||
!isInMemory &&
|
!isInMemory &&
|
||||||
it("validates conditions that are not objects", async () => {
|
it("validates conditions that are not objects", async () => {
|
||||||
await expect(
|
await expect(
|
||||||
expectQuery({
|
expectQuery({
|
||||||
$and: {
|
$and: {
|
||||||
conditions: [{ equal: { age: 10 } }, "invalidCondition" as any],
|
conditions: [{ equal: { age: 10 } }, "invalidCondition" as any],
|
||||||
},
|
},
|
||||||
}).toFindNothing()
|
}).toFindNothing()
|
||||||
).rejects.toThrow(
|
).rejects.toThrow(
|
||||||
'Invalid body - "query.$and.conditions[1]" must be of type object'
|
'Invalid body - "query.$and.conditions[1]" must be of type object'
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
|
|
||||||
!isInMemory &&
|
!isInMemory &&
|
||||||
it("validates $and without conditions", async () => {
|
it("validates $and without conditions", async () => {
|
||||||
await expect(
|
await expect(
|
||||||
expectQuery({
|
expectQuery({
|
||||||
$and: {
|
$and: {
|
||||||
conditions: [
|
conditions: [
|
||||||
{ equal: { age: 10 } },
|
{ equal: { age: 10 } },
|
||||||
{
|
{
|
||||||
$and: {
|
$and: {
|
||||||
conditions: undefined as any,
|
conditions: undefined as any,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
],
|
||||||
],
|
},
|
||||||
},
|
}).toFindNothing()
|
||||||
}).toFindNothing()
|
).rejects.toThrow(
|
||||||
).rejects.toThrow(
|
'Invalid body - "query.$and.conditions[1].$and.conditions" is required'
|
||||||
'Invalid body - "query.$and.conditions[1].$and.conditions" is required'
|
)
|
||||||
)
|
})
|
||||||
})
|
|
||||||
})
|
})
|
||||||
|
|
||||||
!isLucene &&
|
!isLucene &&
|
||||||
|
|
Loading…
Reference in New Issue