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

Buttons Tests #1024

Merged
merged 1 commit into from
Jan 23, 2012
Merged

Buttons Tests #1024

merged 1 commit into from
Jan 23, 2012

Conversation

gnuwilliam
Copy link
Contributor

Hello!

I was taking a look in the unit tests, and some of them was failing (button stuff), then I noticed that some of them should be asynchronous tests, since it was using an asynchronous functionality, the setTimeout()

I've created asynchronous tests for them, and now all the tests are passing.

Thanks, see ya! :)

@deepinsource
Copy link

hi @gnuwilliam
I don't quite understand the meaning of

setTimeout(function () {
  state == 'loadingText' ?
    $el.addClass(d).attr(d, d) :
    $el.removeClass(d).removeAttr(d)
}, 0)

why not invoking directly without setTimeout?

@gnuwilliam
Copy link
Contributor Author

Yep, I would say the same. But this was already implemented, so I've decided to keep this way. If there is no problem changing it, I can do that and test it without the asynchronous way.

fat added a commit that referenced this pull request Jan 23, 2012
@fat fat merged commit 9dcc16f into twbs:master Jan 23, 2012
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.

3 participants