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

Hook unit tests #169

Merged
merged 19 commits into from
Feb 1, 2024
Merged

Hook unit tests #169

merged 19 commits into from
Feb 1, 2024

Conversation

muselesscreator
Copy link
Contributor

Adds testing coverage for the hooks directory.

Copy link

codecov bot commented Jan 10, 2024

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (13cf912) 71.86% compared to head (c48ff40) 81.63%.

❗ Current head c48ff40 differs from pull request most recent head f10c148. Consider uploading reports for the commit f10c148 to get more accurate results

Files Patch % Lines
src/components/StepProgressIndicator/index.jsx 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #169      +/-   ##
==========================================
+ Coverage   71.86%   81.63%   +9.76%     
==========================================
  Files         164      148      -16     
  Lines        1905     1693     -212     
  Branches      459      392      -67     
==========================================
+ Hits         1369     1382      +13     
+ Misses        491      293     -198     
+ Partials       45       18      -27     

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

@@ -61,6 +61,7 @@ const useFinishedStateActions = () => {
// and there are no more assessments available for the current step
return { primary: exitAction };
}
console.log({ primary: startStepAction, secondary: exitAction });
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
console.log({ primary: startStepAction, secondary: exitAction });

behavior: 'smooth',
});
}, [hasSubmitted, step]);
if (isMounted.current) {
Copy link
Contributor

Choose a reason for hiding this comment

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

isn't useIsMounted here redundant?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

goal here is checking if still mounted, not if mounted yet

...selectors,
useStepState,
useXBlockState,
useActiveStepConfig,
useGlobalState,
});
console.log({ exportedSelectors: exported });
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
console.log({ exportedSelectors: exported });

@openedx-webhooks
Copy link

Thanks for the pull request, @muselesscreator! Please note that it may take us up to several weeks or months to complete a review and merge your PR.

Feel free to add as much of the following information to the ticket as you can:

  • supporting documentation
  • Open edX discussion forum threads
  • timeline information ("this must be merged by XX date", and why that is)
  • partner information ("this is a course on edx.org")
  • any other information that can help Product understand the context for the PR

All technical communication about the code itself will be done via the GitHub pull request interface. As a reminder, our process documentation is here.

Please let us know once your PR is ready for our review and all tests are green.

⚠️ We can't start reviewing your pull request until you've submitted a signed contributor agreement or indicated your institutional affiliation. Please see the CONTRIBUTING file for more information. If you've signed an agreement in the past, you may need to re-sign. See The New Home of the Open edX Codebase for details.

Once you've signed the CLA, please allow 1 business day for it to be processed. After this time, you can re-run the CLA check by adding a comment here that you have signed it. If the problem persists, you can tag the @openedx/cla-problems team in a comment on your PR for further assistance.

@openedx-webhooks openedx-webhooks added the open-source-contribution PR author is not from Axim or 2U label Jan 31, 2024
@leangseu-edx leangseu-edx mentioned this pull request Jan 31, 2024
@leangseu-edx leangseu-edx merged commit 2083818 into master Feb 1, 2024
7 checks passed
@leangseu-edx leangseu-edx deleted the bw/documentation branch February 1, 2024 15:02
@openedx-webhooks
Copy link

@muselesscreator 🎉 Your pull request was merged! Please take a moment to answer a two question survey so we can improve your experience in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
open-source-contribution PR author is not from Axim or 2U
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants