The open alternative to Salesforce, designed for AI.
TypeScript crmcrm-systemcustomergood-first-issuegraphqlhacktoberfestjavascriptmarketingmonoreponestjsopen-sourcepostgresqlreactreactjssalestypescriptweb
Add map back to gql person
Anders Borch4e517fa8f9c8
diff --git a/front/src/interfaces/person.interface.test.ts b/front/src/interfaces/person.interface.test.tsindex 75aa9f4f5cd..1f828b10608 100644--- a/front/src/interfaces/person.interface.test.ts+++ b/front/src/interfaces/person.interface.test.ts@@ -1,4 +1,4 @@-import { mapPerson } from './person.interface';+import { mapGqlPerson, mapPerson } from './person.interface';describe('mapPerson', () => {it('should map person', () => {@@ -20,4 +20,27 @@ describe('mapPerson', () => {});expect(person.fullName).toBe('John Doe');});++ it('should map person back', () => {+ const person = mapGqlPerson({+ id: 1,+ fullName: 'John Doe',+ email: '',+ phone: '',+ city: '',+ company: {+ id: 1,+ name: '',+ domain: '',+ },+ creationDate: new Date(),+ pipe: {+ id: 3,+ name: '',+ icon: '',+ },+ countryCode: '',+ });+ expect(person.firstname).toBe('John');+ });});