[ZEPPELIN-6649] Add unit tests for the remaining shared utilities (shell + remote) - #5524
Open
huiseong29 wants to merge 1 commit into
Open
huiseong29 wants to merge 1 commit into
huiseong29 wants to merge 1 commit into
Conversation
Contributor
Author
|
The This PR only adds spec files under Running |
voidmatcha
approved these changes
Oct 3, 2026
voidmatcha
left a comment
Member
There was a problem hiding this comment.
LGTM 👍 Optional nit: assert the full XLSX media type rather than a substring.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What is this PR for?
Adds unit tests for the three utilities left over in ZEPPELIN-6649, following the conventions in
zeppelin-web-angular/AGENTS.md.isRecord(src/app/utility/type-utility.ts): thenulland array boundaries, primitives, functions, and an object without a prototype.parseTableData(projects/zeppelin-react/src/utils/tableUtils.ts): header/rows split on tabs, header-only input, trailing newline, and an empty cell between tabs.exportFile(projects/zeppelin-react/src/utils/exportFile.ts): extends the existing spec with multi-row CSV assembly, the xlsx branch (file name, MIME type, and header plus rows read back fromSheet1), and the empty-data guard for xlsx and for data withoutrows.Spec files only; no production code is changed. The files the issue lists as out of scope (
element.ts,css-unit-conversion.ts,line-map.ts) are not touched.Not pinned on purpose, since the baseline says not to record behaviour that is already questionable:
parseTableDatatrims the whole input, so a leading empty header cell loses its tab ("\tb\n1\t2"gives["b"]); CRLF input leaves a trailing\ron each cell at the end of a line; an empty string yields one empty column name. I can open a follow-up issue for these if useful.What type of PR is it?
Improvement
Todos
isRecord,parseTableDataandexportFileWhat is the Jira issue?
How should this be tested?
cd zeppelin-web-angular && npm run test:shell -- type-utility.spec.ts(10 tests)cd zeppelin-web-angular/projects/zeppelin-react && npm test && npm run lint(18 tests insrc/utils)Screenshots (if appropriate)
Questions: