Add map back to gql person
This commit is contained in:
@ -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');
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user