Expect bound logs in time unit history test

This commit is contained in:
karilint
2026-05-27 14:53:03 +03:00
parent 22d01f9ab7
commit 65fbf5fe1b
@@ -45,7 +45,16 @@ describe('GET /time-unit endpoints', () => {
time_update_id: number time_update_id: number
tuid: number | null tuid: number | null
lower_buid: number | null lower_buid: number | null
lower_bound_update: { buid: number; updates: unknown[] } | null lower_bound_update: {
buid: number
updates: Array<{
buid: number | null
table_name: string | null
column_name: string | null
old_data: string | null
new_data: string | null
}>
} | null
}> }>
}>('time-unit/langhian', 'GET') }>('time-unit/langhian', 'GET')
@@ -58,7 +67,24 @@ describe('GET /time-unit endpoints', () => {
lower_buid: 403, lower_buid: 403,
lower_bound_update: { buid: 403 }, lower_bound_update: { buid: 403 },
}) })
expect(lowerBoundSummary?.lower_bound_update?.updates).toEqual([]) expect(lowerBoundSummary?.lower_bound_update?.updates).toEqual(
expect.arrayContaining([
expect.objectContaining({
buid: 403,
table_name: 'now_tu_bound',
column_name: 'b_name',
old_data: 'Lan/Srv',
new_data: 'Langhian/Serravallian',
}),
expect.objectContaining({
buid: 403,
table_name: 'now_tu_bound',
column_name: 'age',
old_data: '14.8',
new_data: '13.82',
}),
])
)
}) })
it('handles unexpected failures gracefully', async () => { it('handles unexpected failures gracefully', async () => {