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.
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
Using fully qualified names in library Transformations as identifiers #1487
Using fully qualified names in library Transformations as identifiers #1487
Changes from all commits
7846e3d
dadae2e
ce6c7b8
e7a979a
bcfb87a
9362f4d
b7b18a7
806221a
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Check warning on line 180 in packages/lib-sourcify/src/lib/verification.ts
Codecov / codecov/patch
packages/lib-sourcify/src/lib/verification.ts#L180
Check warning on line 202 in packages/lib-sourcify/src/lib/verification.ts
Codecov / codecov/patch
packages/lib-sourcify/src/lib/verification.ts#L202
Check warning on line 732 in packages/lib-sourcify/src/lib/verification.ts
Codecov / codecov/patch
packages/lib-sourcify/src/lib/verification.ts#L732
Check warning on line 737 in packages/lib-sourcify/src/lib/verification.ts
Codecov / codecov/patch
packages/lib-sourcify/src/lib/verification.ts#L736-L737
Check warning on line 327 in services/server/src/server/services/storageServices/SourcifyDatabaseService.ts
Codecov / codecov/patch
services/server/src/server/services/storageServices/SourcifyDatabaseService.ts#L323-L327
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.
Add test coverage for library names handling for Solidity < 0.5.0.
The logic for handling library names for Solidity < 0.5.0 is not covered by tests.
Do you want me to generate the unit testing code or open a GitHub issue to track this task?
Tools
GitHub Check: codecov/patch
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.
Generate unit testing code
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.
@kuzdogan, here are the unit tests to cover the handling of library names for Solidity < 0.5.0 in the
SourcifyDatabaseService
class:These tests cover the logic for handling library names for both Solidity < 0.5.0 and Solidity >= 0.5.0. The tests ensure that the library names are correctly formatted to their respective placeholder formats.
Learnings added
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.
Do it in nock, chai and mocha
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.
@kuzdogan, here are the unit tests rewritten to use nock, chai, and mocha:
These tests now use nock to mock HTTP requests, chai for assertions, and mocha as the test runner. This should align with your preferred testing stack.
Learnings used