test: Add test to validate error when 'in' field in where clause is undefine and contain null values (#17670)
This commit is contained in:
@@ -44,4 +44,18 @@ describe("Disallow undefined delete/update many", () => {
|
||||
|
||||
checkUndefinedInValue(where);
|
||||
});
|
||||
|
||||
it("checkUndefinedInValue should throw exception when the where object contain null values and 'in' field is undefined", async () => {
|
||||
const where = {
|
||||
teamId: null,
|
||||
parentId: null,
|
||||
id: {
|
||||
in: undefined,
|
||||
},
|
||||
};
|
||||
|
||||
expect(() => checkUndefinedInValue(where)).toThrowError(
|
||||
'The "in" value for the field "id" cannot be undefined.'
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user