Skip to content

Commit 28c90e7

Browse files
committed
Remove invalid test and update country resolvers to work with main
1 parent 1dd569f commit 28c90e7

File tree

2 files changed

+1
-23
lines changed

2 files changed

+1
-23
lines changed

v1-to-v2-data-migration/countryData/countryResolvers.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { Address, COUNTRY_CODE, resolveAddress } from './addressResolver.ts'
55
// The V1 response will populate both the informant and special informant fields
66
// so we need to check if the informant is a special informant to avoid duplication
77
export const birthSpecialInformants = ['MOTHER', 'FATHER']
8-
export const deathSpecialInformants = []
8+
export const deathSpecialInformants = ['']
99

1010
const convertChildAddress = (data: EventRegistration): Address => {
1111
const country = getCustomField(
@@ -73,8 +73,6 @@ export const countryResolver = {
7373
getCustomField(data, 'death.deathEvent.death-event-details.timeOfDeath'),
7474
'informant.relation': (data: EventRegistration) =>
7575
data.informant?.relationship,
76-
'eventDetails.date': (data: EventRegistration) =>
77-
data.deceased?.deceased?.deathDate,
7876
'deceased.brn': (data: EventRegistration) =>
7977
getCustomField(data, 'death.deceased.deceased-view-group.birthRegNo'),
8078
}

v1-to-v2-data-migration/tests/SOM/nameResolver.test.ts

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -205,26 +205,6 @@ Deno.test('SOM name resolver tests - death events', async (t) => {
205205
})
206206
})
207207

208-
await t.step('should not resolve informant.name for SPOUSE', () => {
209-
const registration = buildDeathEventRegistration({
210-
informant: {
211-
relationship: 'SPOUSE',
212-
name: [
213-
{
214-
firstNames: 'Amina',
215-
familyName: 'Omar',
216-
},
217-
],
218-
},
219-
})
220-
221-
const result = transform(registration, deathResolver, 'death')
222-
const declareAction = result.actions.find((a) => a.type === 'DECLARE')
223-
224-
// SPOUSE is a special informant, so informant.name should not be set
225-
assertEquals(declareAction?.declaration['informant.name'], undefined)
226-
})
227-
228208
await t.step('should resolve spouse.name', () => {
229209
const registration = buildDeathEventRegistration({
230210
spouse: {

0 commit comments

Comments
 (0)