-
Notifications
You must be signed in to change notification settings - Fork 15
[♻] Improve ZipFileMock constructor #1218
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The head ref may contain hidden characters: "\u267B-zipfile-mock-changes-and-test"
Conversation
# ✍️ Description Again, this was found wanting for #1218. This coupling was probably not needed, so that all information for an entry occurs in the entry itself, and it does not need to be handled by the hosting zipFile. Since this is a Mock, we don't really need more than that. ## ℹ️ Other information Might include some tests, and additional spin-off of all ZipMockFile methods that create Entries.
|
|
||
| async function analyzeZipWithFiles(files) { | ||
| const zipFile = new ZipFileMock(); | ||
| let dataFilePairs = []; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: This should still be possible to be const, since it's not being reassigned.
| expectActiveAnalysis, | ||
| expectAnalysisSuccessStatus, | ||
| } from "../utils/analysis-assertions"; | ||
| import { createMockedZip } from "../utils/data-creation"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can createMockedZip be removed now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You mean, from all over? It's used in some other places. I'd have to check.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, it can be removed. It's essentially doing what the new ctor is doing. Only... It's all over, as said. I'll probably just refactor it to avoid extensive changes.
It's not needed with the new constructor, only it's all over...
✍️ Description
While doing #1204, the need to refactor mocks arose. It became a bit hefty for an already heavy PR, so it's better taken outside.
🏗️ Working with PROD4POD-1931
ℹ️ Other information
I'll leave it as draft for the time being, since some functions might be unneeded after this. Feedback welcome anyway.