-
Notifications
You must be signed in to change notification settings - Fork 79
Extend tests #1698
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
Extend tests #1698
Conversation
Summary of ChangesHello @arhtudormorar, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly expands the project's test suite by introducing new unit tests for critical utility functions and error handling logic. The changes aim to bolster the reliability and maintainability of the codebase, particularly in areas concerning transaction processing, value interpretation, and user feedback mechanisms. This proactive approach to testing helps ensure that core functionalities behave as expected and provides a safety net for future development. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
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.
Code Review
This pull request significantly extends the test coverage by adding new test files for various helper functions. The new tests are well-structured and improve the overall quality and reliability of the codebase. I've provided a couple of suggestions to further improve the assertions and clarity in one of the new test files.
| expect(decodeURI(result)).toContain('WEGLD'); | ||
| expect(decodeURI(result)).toContain('USDC'); |
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.
The decodeURI call here is redundant because the getTitleText function already returns a decoded string. Removing this will make the test assertions clearer and more direct.
| expect(decodeURI(result)).toContain('WEGLD'); | |
| expect(decodeURI(result)).toContain('USDC'); | |
| expect(result).toContain('WEGLD'); | |
| expect(result).toContain('USDC'); |
|
|
||
| expect(result).toContain('WEGLD'); | ||
| expect(result).toContain('WEGLD-d7c6bb'); | ||
| expect(result).toBeTruthy(); |
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.
The assertion expect(result).toBeTruthy() is too generic and doesn't effectively test the behavior for decimals: 0. A more specific assertion would make this test more robust by verifying that the large number is formatted as expected. For example, you could check that the result contains the formatted value.
| expect(result).toBeTruthy(); | |
| expect(result).toContain('1,000,000,000,000,000,000'); |
Extend tests