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

#706 - Scunt Mission Services tests #727

Merged
merged 8 commits into from
Aug 18, 2023

Conversation

Tanushanth
Copy link
Contributor

Contribution:

Issue:

Closes #706

Accomplishments:

  • Created Tests for Functions in ScuntMissionServices.js

Visuals:

image

Details:

Expected Behavior:

  • When running tests, should all be functional for every function. Only uncovered error lines should be errors in the following functions: getAllScuntMissions, createMultipleMissions (.find() errors unreachable?)

Testing Steps:

Steps required to get expected behavior.

  • Run docker Command, add testing line to package.json and run yarn testing within server directory

Complications:

  • Unable to reach error cases in getAllScuntMissions, createMultipleMissions
  • The function updateMissionVisibility originally returns missions as if it will be a ScuntMission[] array, but rather it is an object that has a property of .modifiedCount that indicates the amount of documents that were modified (property of .updateMany()). I had to change this to properly throw the error
  • Also changed the createMultipleMission function to reflect PR 698 - Bug in CSV Upload #709

Resources:

Any additional resources used outside this in issue.

@Freeassassin Freeassassin merged commit 476aaa5 into 687-refactor-testing Aug 18, 2023
4 of 6 checks passed
@Freeassassin Freeassassin deleted the 706-scunt-mission-services-tests branch August 18, 2023 19:32
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