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

Major unit tests cleanup #13853

Merged
merged 16 commits into from
Jul 7, 2014
Merged

Major unit tests cleanup #13853

merged 16 commits into from
Jul 7, 2014

Conversation

hnrch02
Copy link
Collaborator

@hnrch02 hnrch02 commented Jun 18, 2014

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

setTimeout(function () {
window.scroll(0, 0)
}, 0)
}, 18) // for testing in a browser
Copy link
Member

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?

Copy link
Collaborator Author

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).

Copy link
Member

Choose a reason for hiding this comment

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

ah ok

@fat
Copy link
Member

fat commented Jul 6, 2014

this is super rad. thanks so much for doing this… left a few tiny notes

@hnrch02
Copy link
Collaborator Author

hnrch02 commented Jul 6, 2014

Will work on the rest later, gonna eat some now.

@fat
Copy link
Member

fat commented Jul 6, 2014

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>'
Copy link
Member

Choose a reason for hiding this comment

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

why 4 spaces here?

Copy link
Collaborator Author

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?

Copy link
Member

Choose a reason for hiding this comment

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

eh, it's chill

fat added a commit that referenced this pull request Jul 7, 2014
@fat fat merged commit b5d86ad into twbs:master Jul 7, 2014
@fat
Copy link
Member

fat commented Jul 7, 2014

major ❤️ for this, thanks again

@mdo mdo added this to the v3.2.1 milestone Jul 7, 2014
@cvrebert cvrebert mentioned this pull request Jul 7, 2014
@hnrch02 hnrch02 deleted the unit-tests-cleanup branch July 7, 2014 06:54
@hnrch02
Copy link
Collaborator Author

hnrch02 commented Jul 7, 2014

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 this pull request may close these issues.

5 participants