-
-
Notifications
You must be signed in to change notification settings - Fork 78.9k
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
Major unit tests cleanup #13853
Major unit tests cleanup #13853
Conversation
setTimeout(function () { | ||
window.scroll(0, 0) | ||
}, 0) | ||
}, 18) // for testing in a browser |
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.
ha could you leave a bit more in this note… why 18?
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.
It didn't work with 0, obviously, so I moved to a higher number and remembered that Paul Irish's rAF polyfill used 18 (it actually uses 16 ms, now that I see it. I guess I remembered wrongly).
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.
ah ok
this is super rad. thanks so much for doing this… left a few tiny notes |
Will work on the rest later, gonna eat some now. |
heh ok |
var template = $('<div id="affixTarget"><ul><li>Please affix</li><li>And unaffix</li></ul></div><div id="affixAfter" style="height: 20000px; display:block;"></div>') | ||
template.appendTo('body') | ||
var templateHTML = '<div id="affixTarget">' | ||
+ '<ul>' |
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.
why 4 spaces here?
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.
These all have four spaces, the original templates that were spread across lines were all indented by four spaces, so I sticked to it. Should I move to two?
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.
eh, it's chill
major ❤️ for this, thanks again |
✨ |
This is a pretty big PR attempting to clean up our unit tests. I reworked a few, but mostly performed style/consistency updates.
I created separate commits for the cleanup of each file, I don't know but that may help during the review. Will ofc squash if it is decided that this should be merged.
Also, I'll need to spend some time on the scrollspy tests, my shallow inspection concluded that they might not work as intended.The scrollspy test will work once #13500 is merged./cc @fat @cvrebert @XhmikosR