You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
508 B
20 lines
508 B
|
2 days ago
|
import { camelizeKeys } from '@/utils/apiDto'
|
||
|
|
|
||
|
|
describe('API DTO key mapping', () => {
|
||
|
|
it('maps nested snake_case response keys without changing values', () => {
|
||
|
|
expect(camelizeKeys({
|
||
|
|
lead_submission: {
|
||
|
|
total_amount: '0.0001',
|
||
|
|
economic_summary: [{ category_id: 10 }]
|
||
|
|
},
|
||
|
|
blocking_departments: []
|
||
|
|
})).toEqual({
|
||
|
|
leadSubmission: {
|
||
|
|
totalAmount: '0.0001',
|
||
|
|
economicSummary: [{ categoryId: 10 }]
|
||
|
|
},
|
||
|
|
blockingDepartments: []
|
||
|
|
})
|
||
|
|
})
|
||
|
|
})
|