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

Improve user-preferences test #880

Merged
merged 14 commits into from Oct 30, 2022
Merged

Improve user-preferences test #880

merged 14 commits into from Oct 30, 2022

Conversation

ochan12
Copy link
Contributor

@ochan12 ochan12 commented Oct 22, 2022

Related issue

Closes #868

Context / Background

Adds an extensive suite of tests to user-preferences.js and a couple of fixes
as a consequence of these tests.

What change is being introduced by this PR?

I tried to get 100% coverage on the test going over all the functions.
Some preferences like theme, view, language were not being updated while testing so I
had to change the bitwise assignment clause. Also added the validation for overall-balance-start-date and update-remind-me-after.

How will this be tested?

The issue is about tests :)


  • I confirm I'm a native or fluent speaker of the language I'm translating to.

@codecov
Copy link

codecov bot commented Oct 23, 2022

Codecov Report

Merging #880 (008611b) into main (b0d2fc8) will increase coverage by 2.24%.
The diff coverage is 100.00%.

❗ Current head 008611b differs from pull request most recent head 241e2c9. Consider uploading reports for the commit 241e2c9 to get more accurate results

@@            Coverage Diff             @@
##             main     #880      +/-   ##
==========================================
+ Coverage   71.99%   74.24%   +2.24%     
==========================================
  Files          17       17              
  Lines        1721     1747      +26     
  Branches      264      268       +4     
==========================================
+ Hits         1239     1297      +58     
+ Misses        482      450      -32     
Impacted Files Coverage Δ
js/user-preferences.js 100.00% <100.00%> (+26.01%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Copy link
Collaborator

@araujoarthur0 araujoarthur0 left a comment

Choose a reason for hiding this comment

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

Awesome contribution! Left some comments mostly about consistency, but I love this :)

__tests__/__main__/user-preferences.js Outdated Show resolved Hide resolved
__tests__/__main__/user-preferences.js Outdated Show resolved Hide resolved
__tests__/__main__/user-preferences.js Outdated Show resolved Hide resolved
__tests__/__main__/user-preferences.js Outdated Show resolved Hide resolved
__tests__/__main__/user-preferences.js Outdated Show resolved Hide resolved
__tests__/__main__/user-preferences.js Outdated Show resolved Hide resolved
docs/README-he.md Outdated Show resolved Hide resolved
js/user-preferences.js Outdated Show resolved Hide resolved
js/user-preferences.js Outdated Show resolved Hide resolved
js/user-preferences.js Outdated Show resolved Hide resolved
@araujoarthur0 araujoarthur0 merged commit f9a9f10 into thamara:main Oct 30, 2022
@araujoarthur0
Copy link
Collaborator

\changelog-update
Message: Enhancement [#868]: Improve User Preferences tests

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.

Improve user-preferences test
2 participants