-
-
Notifications
You must be signed in to change notification settings - Fork 33
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
Increase test coverage #40
Comments
Added unit tests for |
I was writing tests to cover missing branches and found out that in const propValue = sanitizeTemplateString(props[propName])
const nextAreas = propValue ? res.areas.concat(propValue) : res.areas propValue can be never undefined or false because So either check for array length or remove this check. |
@Vidlec You are completely right! [].concat(2) // [2]
// is indeed the same as
[].concat([2]) // [2] Yes, we should remove that check and just concat the received sanitized template string to If you can, you can add that via pull request, that would be massively appreciated! If not, just create a ticket so we don't forget about that. Also, ❤️ for increasing test coverage. |
There is a one last thing to have 100% coverage if (prefix === 'min') {
if (includesArea) {
if (behavesSame || behavesInclusive) {
nextValue = breakpointB[propName]
}
} else {
if (shouldStretch) {
nextValue = breakpointB[propName]
}
}
} That |
@Vidlec 😄 I think this is I can explain you in person, just ping me anytime. It's nothing complicated, I promise. |
Test coverage has increased to 100% by merging your pull request #47. Much thanks and welcome to contributors! |
@Vidlec Please let me know if we should reopen this issue to have that last branch covered. I have overlooked the comment and have already closed it. Sorry. |
What
Need to increase code coverage up to 100%.
Why
To have our code covered with tests, of course. And also because 99% coverage is simply unacceptable.
How
The text was updated successfully, but these errors were encountered: