yyqdbngt opened a new pull request, #3880: URL: https://github.com/apache/rocketmq-dashboard/pull/3880
### Motivation The CSV utility tests covered `buildCsv` escaping and `downloadBlob` cleanup, but `escapeCsvCell` formula protection and `downloadCsv` were only exercised indirectly. This PR grows the suite from 4 to 12 cases. ### Changes - `escapeCsvCell` direct coverage: quote doubling, null/undefined as empty cells, formula protection for `=`, `+`, `-`, `@`, `==` and `=`-only cells, lone-apostrophe plus formula, and ordinary apostrophes in the middle of text left untouched. - Typed values (numbers, booleans) stringify; `null` becomes an empty cell. - `buildCsv` emits only the header row for an empty table and an empty document when neither columns nor rows exist. - `downloadCsv` wraps the given text in a `text/csv;charset=utf-8` blob, preserves the csv content, and starts a download under the requested filename. ### Verification - `vitest run src/utils/download.test.ts`: 12/12 passed - `tsc --noEmit`: clean - `eslint src/utils/download.test.ts`: clean -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
