Skip to content

Commit 7c445a8

Browse files
authored
Fix: #25 make emergency contact info nullable (#26)
* feat: modified fixture contact info to null in order to break tests * fix: modified employee schema to allow nullable values on contactName and contactNumber * chore: updated package-lock.json
1 parent 27d2714 commit 7c445a8

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/infrastructure/factorial-client/schema/MySelf.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { z } from "zod";
21
import { Employee } from "./Employee.js";
2+
import { z } from "zod";
33

44
export const MySelf = Employee.extend({
55
country: z.enum(["es"]),
@@ -14,8 +14,8 @@ export const MySelf = Employee.extend({
1414
socialSecurityNumber: z.string().nullable(),
1515
hasWorkPermit: z.boolean().nullable(),
1616
}),
17-
contactName: z.string(),
18-
contactNumber: z.string(),
17+
contactName: z.string().nullable(),
18+
contactNumber: z.string().nullable(),
1919
phoneNumber: z.string(),
2020
hiredOn: z.string().nullable(),
2121
identifier: z.string(),

test/fixtures/employees.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -353,8 +353,8 @@
353353
"socialSecurityNumber": null,
354354
"hasWorkPermit": null
355355
},
356-
"contactName": "Andrés Herrera Cárdenas",
357-
"contactNumber": "+34 667 12 23 34",
356+
"contactName": null,
357+
"contactNumber": null,
358358
"phoneNumber": "666995511",
359359
"hiredOn": null,
360360
"identifier": "18523583G",

0 commit comments

Comments
 (0)