to-camel-case.test.ts
451 Bytes
import { describe, expect, it } from 'vitest';
import { toCamelCaseDeep } from './to-camel-case.js';
describe('toCamelCaseDeep', () => {
it('converts nested snake_case keys to camelCase', () => {
expect(
toCamelCaseDeep({
staff_uuid: 'u-1',
read_case_list: [{ activity_id: 1, product_type: 0 }],
}),
).toEqual({
staffUuid: 'u-1',
readCaseList: [{ activityId: 1, productType: 0 }],
});
});
});