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

Unit test for services post_services.dart #2244

Merged
merged 9 commits into from Dec 15, 2023
Merged

Unit test for services post_services.dart #2244

merged 9 commits into from Dec 15, 2023

Conversation

ghost
Copy link

@ghost ghost commented Dec 12, 2023

What kind of change does this PR introduce?

This change included the Unit test for service post_service.dart

Issue Number:#2160

Fixes #2160

Did you add tests for your changes?

Yes, I have added tests.

Does this PR introduce a breaking change?

No, this does not involve major changes to the codebase.

Have you read the contributing guide?

Yes, I have followed the contribution guideline.

Copy link

Our Pull Request Approval Process

We have these basic policies to make the approval process smoother for our volunteer team.

Testing Your Code

Please make sure your code passes all tests. Our test code coverage system will fail if either of these two conditions occur:

  1. The overall code coverage drops below the target threshold of the repository
  2. Any file in the pull request has code coverage levels below the repository threshold

The process helps maintain the overall reliability of the code base and is a prerequisite for getting your PR approved. Assigned reviewers regularly review the PR queue and tend to focus on PRs that are passing.

Reviewers

When your PR has been assigned reviewers contact them to get your code reviewed and approved via:

  1. comments in this PR or
  2. our slack channel

Reviewing Your Code

Your reviewer(s) will have the following roles:

  1. arbitrators of future discussions with other contributors about the validity of your changes
  2. point of contact for evaluating the validity of your work
  3. person who verifies matching issues by others that should be closed.
  4. person who gives general guidance in fixing your tests

Other

🎯 Please be considerate of our volunteers' time. Contacting the person who assigned the reviewers is not advised unless they ask for your input. Do not @ the person who did the assignment otherwise.

Copy link
Member

@noman2002 noman2002 left a comment

Choose a reason for hiding this comment

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

Please fix the failing tests.

@ghost ghost closed this Dec 13, 2023
@ghost ghost reopened this Dec 13, 2023
@ghost ghost closed this Dec 13, 2023
@ghost ghost reopened this Dec 13, 2023
@ghost
Copy link
Author

ghost commented Dec 14, 2023

@noman2002 sir, as soon as i remove
// ignore_for_file: talawa_api_doc, avoid_dynamic_calls // ignore_for_file: talawa_good_doc_comments from the post_service.dart i get an error in the dart file and all the test cases that i runned previously and have 100% coverage starts to fail.Can you suggest me what to do?

@Dante291
Copy link
Contributor

Dante291 commented Dec 14, 2023

Hello @PraminBudhathoki, there are certain linting checks in Talwa in order to maintain the proper code format so that the good practice of writing code in a proper formatted way such that it should be understandable by all the current and future contributors remains maintained.

// ignore_for_file: talawa_api_doc, avoid_dynamic_calls // ignore_for_file: talawa_good_doc_comments these lines basically ignore these checks, but what you could do is write proper documentation for each method written in that file and give a correct Data type to the objects/variables that are declared as Dynamic and then modify your tests accordingly.

You could get the proper doc format for the methods which shows linting errors by pressingCtrl+. and then write the proper doc for the required function.

I hope this helped you a little, do hit me up or in #talawa-mobile channel on slack if you need any further help.

@ghost
Copy link
Author

ghost commented Dec 14, 2023

@Dante291 ok i will fix it . Thanks.

Copy link

codecov bot commented Dec 14, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (518c5c8) 80.08% compared to head (be6e5c8) 80.73%.
Report is 15 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #2244      +/-   ##
===========================================
+ Coverage    80.08%   80.73%   +0.64%     
===========================================
  Files          149      149              
  Lines         6966     7006      +40     
===========================================
+ Hits          5579     5656      +77     
+ Misses        1387     1350      -37     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@palisadoes palisadoes merged commit f779ff7 into PalisadoesFoundation:develop Dec 15, 2023
7 checks passed
palisadoes pushed a commit to palisadoes/talawa that referenced this pull request Jan 10, 2024
* Added unit_tests for post_service.dart

* Formatted the updated test code

* Fix lint issues in post_service.dart

* formatted the modified dart files

* fixed error after running flutter analyze

* fixed error after running flutter analyze

* modified

* formatted the code

* modified
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.

Write tests for service post_service.dart
3 participants