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

Add more unit tests #190

Merged
merged 2 commits into from
Mar 31, 2021
Merged

Add more unit tests #190

merged 2 commits into from
Mar 31, 2021

Conversation

NickPhura
Copy link
Collaborator

Overview

Links to jira tickets

n/a

This PR contains the following changes

Add more unit tests for random api files.

This PR contains the following types of changes

  • New feature (change which adds functionality)
  • Enhancement (improvements to existing functionality)
  • Bug fix (change which fixes an issue)
  • Misc cleanup / Refactoring / Documentation
  • Version change

Checklist

A list of items that are good to consider when making any changes.

Note: this list is not exhaustive, and not all items are always applicable.

General

  • I have performed a self-review of my own code

Code

  • New files/classes/functions have appropriately descriptive names and comment blocks to describe their use/behaviour
  • I have avoided duplicating code when possible, moving re-usable pieces into functions
  • I have avoided hard-coding values where possible and moved any re-usable constants to a constants file
  • My code is as flat as possible (avoids deeply nested if/else blocks, promise chains, etc)
  • My code changes account for null/undefined values and handle errors appropriately
  • My code uses types/interfaces to help describe values/parameters/etc, help ensure type safety, and improve readability

Style

  • My code follows the established style conventions
  • My code uses native material-ui components/icons/conventions when possible

Documentation

  • I have commented my code sufficiently, such that an unfamiliar developer could understand my code
  • I have added/updated README's and related documentation, as needed

Tests

  • I have added/updated unit tests for any code I've added/updated
  • I have added/updated the Postman requests/tests to account for any API endpoints I've added/updated

Linting/Formatting

  • I have run the linter and fixed any issues, as needed
    See the lint commands in package.json
  • I have run the formatter and fixed any issues, as needed
    See the format commands in package.json

SonarCloud

  • I have addressed all SonarCloud Bugs, Vulnerabilities, Security Hotspots, and Code Smells

How Has This Been Tested?

Please describe the tests that you ran to verify your changes.

Screenshots

Please add any relevant UI screenshots, if applicable.

@github-actions
Copy link

A JIRA Issue ID is missing from your branch name! 🦄

Your branch: add_api_tests

If this is your first time contributing to this repository - welcome!


Please refer to jira-lint to get started.

Without the JIRA Issue ID in your branch name you would lose out on automatic updates to JIRA via SCM; some GitHub status checks might fail.

Valid sample branch names:

‣ feature/shiny-new-feature--mojo-10'
‣ 'chore/changelogUpdate_mojo-123'
‣ 'bugfix/fix-some-strange-bug_GAL-2345'

@codecov
Copy link

codecov bot commented Mar 31, 2021

Codecov Report

Merging #190 (b4df9a5) into dev (169f483) will increase coverage by 0.42%.
The diff coverage is 72.72%.

Impacted file tree graph

@@            Coverage Diff             @@
##              dev     #190      +/-   ##
==========================================
+ Coverage   55.10%   55.52%   +0.42%     
==========================================
  Files         111      111              
  Lines        2722     2723       +1     
  Branches      607      607              
==========================================
+ Hits         1500     1512      +12     
+ Misses       1103     1089      -14     
- Partials      119      122       +3     
Impacted Files Coverage Δ
api/src/utils/logger.ts 76.47% <72.72%> (+38.97%) ⬆️
api/src/openapi/root-api-doc.ts 100.00% <0.00%> (+100.00%) ⬆️
api/src/openapi/schemas/permit-no-sampling.ts 100.00% <0.00%> (+100.00%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 169f483...b4df9a5. Read the comment docs.

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@github-actions
Copy link

A JIRA Issue ID is missing from your branch name! 🦄

Your branch: add_api_tests

If this is your first time contributing to this repository - welcome!


Please refer to jira-lint to get started.

Without the JIRA Issue ID in your branch name you would lose out on automatic updates to JIRA via SCM; some GitHub status checks might fail.

Valid sample branch names:

‣ feature/shiny-new-feature--mojo-10'
‣ 'chore/changelogUpdate_mojo-123'
‣ 'bugfix/fix-some-strange-bug_GAL-2345'

Copy link
Contributor

@sdevalapurkar sdevalapurkar left a comment

Choose a reason for hiding this comment

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

fab

@NickPhura NickPhura merged commit ec9e80a into dev Mar 31, 2021
@NickPhura NickPhura deleted the add_api_tests branch March 31, 2021 21:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants