-
-
Notifications
You must be signed in to change notification settings - Fork 530
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
Test src test store #310
Test src test store #310
Conversation
@yasharth291 can you check now ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good job so far!
Please create separate tests/assertions for each property you're testing. As if the schema changes it could become difficult to pinpoint exactly what could be causing the tests to fail.
You could achieve this by setting up the state object to be global to this test suite before the tests, and then separating each test as follows:
Test for checking if the state has the required properties
test('State should contain the properties appRoutes and plugins', () => {
....
}
Test to ensure that the appRoute's schema is as intended
test('appRoutes schema should contain targets, configUrl and components', () => {
...
}
Test to ensure that the plugin's schema is as intended
test('plugins schema should contain installed, addOnStore and extras', () => {
...
}
This would be an essential pattern to adopt as the size of the redux store increases, and as more functionality to be tested gets added
Thank you sir for the response. I will apply assertions to test cases in a few minutes |
Codecov Report
@@ Coverage Diff @@
## develop #310 +/- ##
===========================================
+ Coverage 44.17% 52.33% +8.15%
===========================================
Files 45 45
Lines 704 686 -18
Branches 149 147 -2
===========================================
+ Hits 311 359 +48
+ Misses 380 317 -63
+ Partials 13 10 -3
📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more |
@DangaRanga Sir Is this Ok ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@SiddheshKukade What is the level of code coverage for the file. It's not visible in the CodeCov report. Please paste an image of the reporting of this value. We need to get to 100%
I ran this coomand yarn test --coverage --watchAll=false CODECOV report 👍 |
Note: this repeated PR from #299 due to some technical problems (you can visit #299 for more information)
What kind of change does this PR introduce?
Added Testcases for src/state/index.ts file
Issue Number:
#277
Fixes #277
Did you add tests for your changes?
Yes I have added a testfile
Summary
I have added a store.test.tsx file required for issue #277 for Gsoc2022
Does this PR introduce a breaking change?
No
SnapShots
![image](https://user-images.githubusercontent.com/65951872/159973623-63d965e1-a967-4112-8008-0b565e290919.png)
Have you read the contributing guide?
Yes