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

[Task] Add unit test cases for useSettingsInternal hook #131

Open
tjtanjin opened this issue Oct 3, 2024 · 4 comments · May be fixed by #226
Open

[Task] Add unit test cases for useSettingsInternal hook #131

tjtanjin opened this issue Oct 3, 2024 · 4 comments · May be fixed by #226
Assignees
Labels

Comments

@tjtanjin
Copy link
Owner

tjtanjin commented Oct 3, 2024

Task Description:
Currently, we run unit tests using jest which can be found here.

However, the test cases are not yet comprehensive enough and work can be done to cover more grounds. Specifically for this issue, we hope to add test cases for the useSettingsInternal hook.

Deliverable(s):
New unit test cases that cover the testing of the useSettingsInternal hook.

Additional Context:

  • Hooks API can be found here
  • Existing unit test for hooks can be found here which may serve as a good source for reference.
@anandxs
Copy link
Contributor

anandxs commented Oct 9, 2024

I could not find the useSettingsInternal hook in the project. From what I understand, the useSettings hook directly accesses the settings and setSettings context and returns them.

@tjtanjin
Copy link
Owner Author

I could not find the useSettingsInternal hook in the project. From what I understand, the useSettings hook directly accesses the settings and setSettings context and returns them.

Hey @anandxs! Thank you for pointing it out and apologies for the confusion. You're right to observe that settings hook itself doesn't currently hold any internal logic. I'm contemplating adding a utility function to make updating of settings easier instead of having users directly deal with the setter. Let me ponder over this for a bit more - in the meantime, please feel free to look at other issues if you are keen 🥹

@tjtanjin
Copy link
Owner Author

Hey @anandxs, there's an internal hook for settings now. Let me know if you're still keen to work on it 😊

@anandxs
Copy link
Contributor

anandxs commented Oct 18, 2024

Sure. I'd like to take it.

@anandxs anandxs linked a pull request Oct 19, 2024 that will close this issue
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants