fix: null validation (#25891)

This commit is contained in:
Jason Rasmussen
2026-02-04 12:27:52 -05:00
committed by GitHub
parent 440b3b4c6f
commit 9dddccd831
18 changed files with 357 additions and 47 deletions

View File

@@ -58,6 +58,11 @@ describe(PersonController.name, () => {
await request(ctx.getHttpServer()).post('/people').send({ birthDate: '' });
expect(service.create).toHaveBeenCalledWith(undefined, { birthDate: null });
});
it('should map an empty color to null', async () => {
await request(ctx.getHttpServer()).post('/people').send({ color: '' });
expect(service.create).toHaveBeenCalledWith(undefined, { color: null });
});
});
describe('DELETE /people', () => {