Skip to content
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

Boavizta test coverage #69

Merged
merged 7 commits into from
Apr 4, 2024
Merged

Boavizta test coverage #69

merged 7 commits into from
Apr 4, 2024

Conversation

manushak
Copy link
Contributor

@manushak manushak commented Apr 2, 2024

Types of changes

  • Enhancement (project structure, spelling, grammar, formatting)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

A description of the changes proposed in the Pull Request

  • add full test coverage for boavizta
  • make some small imporvents

@manushak manushak added tests related to unit or integration tests size: medium medium sized task awaiting-dev-review PR is awaiting review from core dev labels Apr 2, 2024
Copy link
Contributor

@jmcook1186 jmcook1186 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@@ -100,6 +129,36 @@ describe('lib/boavizta: ', () => {
expect(await output.execute([])).toEqual([]);
});

it('throws an error when the metric type is `gpu-util`.', async () => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

title says it's throws an error, but the implementation says it has result

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changed

},
]);
} catch (error) {
expect(error).toBeInstanceOf(UnsupportedValueError);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please also assert the error message if possible

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@@ -64,6 +64,35 @@ describe('lib/boavizta: ', () => {
]);
});

it('returns a result when the impacts from the API is undefined.', async () => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why we are returning valid result if the API response is undefined?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated description. We set it to 0 in case of there isn't data from the API

@MariamKhalatova MariamKhalatova merged commit b95b271 into main Apr 4, 2024
2 checks passed
@MariamKhalatova MariamKhalatova deleted the boavizta-test branch April 4, 2024 19:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting-dev-review PR is awaiting review from core dev size: medium medium sized task tests related to unit or integration tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants