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

Hangs the browser when checking must.be.equal #8

Open
tavriaforever opened this issue Jan 16, 2014 · 2 comments
Open

Hangs the browser when checking must.be.equal #8

tavriaforever opened this issue Jan 16, 2014 · 2 comments

Comments

@tavriaforever
Copy link

Hello!
Write tests on the button. When clicking on the button - it should be in focus, but due to the button for other reasons does not receive focus and document.activeElement not equal to the button, and equal document.body. In this case, the test was just to fail, but after my code - crashes the browser(any) or does not hang, but is not performed afterEach.
My code:

var sliderRunner = $('.slider__runner');
sliderRunner.focus();
sliderRunner.get(0).must.equal(document.activeElement);

I tried in different ways:

sliderRunner.get(0).must.be.equal(document.activeElement);
sliderRunner.get(0).must.eql(document.activeElement); //recursive
@moll
Copy link
Owner

moll commented Jan 16, 2014

Hey!

Thanks for taking the time to let me know about this and sorry about the trouble!

I'm guessing it could be an issue with trying to serialize the DOM element to report the failure (something like foo must equal bar). I'll take a look and see how to tone down the serialization for cases where it might take too long.

@alexbaumgertner
Copy link

@moll Hi! What is the status of this issue?

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

No branches or pull requests

3 participants