Summary of What Needs to be Done: Add unit tests for the CSV serialization functions in src/lib/csv.ts: csvCell and toCsv.
Changes that Need to be Made: Create test/csv.test.ts. Cover: csvCell with plain string, number, boolean, null, undefined, string with comma, string with double-quote (must be escaped as """), string with newline, string with all three. Cover toCsv with empty array, single row, multiple rows with missing keys, multiple rows with extra keys, and a realistic mixed dataset. Verify RFC-compliant quoting.
Impact that it would Provide: CSV export is used for user data exports. Correct RFC quoting prevents broken exports when usernames or content contain special characters. Tests here protect against silent data corruption in exported files.
Hello @Priyanshu-byte-coder, please assign this issue to me (@tmdeveloper007) so I can open a focused PR.
Summary of What Needs to be Done: Add unit tests for the CSV serialization functions in src/lib/csv.ts: csvCell and toCsv.
Changes that Need to be Made: Create test/csv.test.ts. Cover: csvCell with plain string, number, boolean, null, undefined, string with comma, string with double-quote (must be escaped as """), string with newline, string with all three. Cover toCsv with empty array, single row, multiple rows with missing keys, multiple rows with extra keys, and a realistic mixed dataset. Verify RFC-compliant quoting.
Impact that it would Provide: CSV export is used for user data exports. Correct RFC quoting prevents broken exports when usernames or content contain special characters. Tests here protect against silent data corruption in exported files.
Hello @Priyanshu-byte-coder, please assign this issue to me (@tmdeveloper007) so I can open a focused PR.