-
Notifications
You must be signed in to change notification settings - Fork 20.6k
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
fix #14040: QUnit.reset() replaced by splitting up into individual tests #1457
Conversation
/cc @Krinkle, @jzaefferer |
Thank you! Please sign our CLA. |
@timmywil he already signed it. |
@markelog Ah, I searched for "Chris Jones" rather than "Christopher". |
@cjqed 🌟 Thanks! |
My pleasure. Is there anything else I need to do? |
Nope, this should be good. We're aiming for a beta3 next week and it should land before that. Thanks a lot for tackling this, it's one of those tasks that has no glory so it's often ignored. I'll add a star as well: 🌟 😺 |
@cjqed there is also some calls of |
@markelog Sure, I saw it originally and wasn't exactly sure how to handle it but upon re-reading some of the code in there I see what needs to be done. I'll do that and commit to this branch. |
@markelog Is there anything else I need to do? Thanks! |
@dmethvin Sorry! Didn't notice that one. Try now? |
@cjqed Do not add Otherwise it could generate some weird problems in the future, since our tests, unfortunately, depend on each other. |
@cjqed It looks to me that instead of removing |
@markelog I understand. The problem I'm running into is that sizzle is trying to access a relative path empty.js at ~/src/sizzle/test/index.html here:
This is fine becuase ~/src/sizzle/test/data/empty.js exists. However, when running sizzle tests from the QUnit GUI, we get a file not found error (causing the odd issue with "unexpected token <") at ~/test/data/empty.js (Not surprising, looking for the relative path). I figured adding the empty file would be better than changing the src to an absolute path.
Yeah, I wasn't too happy with that. Let me go back to the drawing board for the reset() function. |
trying to access a relative path empty.js atYeah, jQuery#html reprocess this script and tries to load it through our ajax module, by using innerHTML for example, you can avoid that.
Let me go back to the drawing board for the reset() function. You could remove most of it logic, by making tests more atomic, like code for ajax and globals cleanup, but our integration tests for sizzle do not let you remove fixture chaos, unless you would make a PR for Sizzle repo as well. An even then, we would still require |
I was thinking of looking at the logic for Since retooling the fixture chaos sounds necessary to fixing this and is a larger issue, I could Is this a good idea, or would you want everything in the same pull request? |
I could git revert You don't have to revert, just remove jQuery("#qunit-fixture").html(QUnit.config.fixture); with jQuery( "#qunit-fixture" )[ 0 ].innerHTML = QUnit.config.fixture; Rebase and make sure everything works in I can then work on cleaning up sizzle testing for a separate pull request. I would suggest you to start with removal of But in any case, it would be great if you could help us out. |
This is automatically copied over when we run |
@timmywil no it's not. By remove empty.jsi meant the one on the test/data/empty.js path, not src/sizzle/test/data/empty.js
|
btw you can remove |
gotcha, thanks for clarifying. |
@markelog Hey, sorry for the question but I use hg at work and am still pretty wet behind the ears on git and rebasing. I made the changes and committed it to my 14040-remove-qunit-reset branch. Do I Again, sorry! |
Do the backup copy of your branch first. Do I git checkout master Yes, then pull from upstream, if haven't add an upstream, do it like that – then pull from it – Then push. That should do it. |
@markelog Okay, did some more reading and realized I did not do that correctly. Instead of trying to fix the branch and have it be incredibly messy, would you mind if I created a new pull request from a new branch that's fresh from master? |
You can |
@dmethvin Thanks for the tip! That looks much better, and the travis build passed. Sorry for the issues! |
@cjqed Thanks! 🌟 I landed this in master. I also tried cherry-picking it into the 1.x-master branch but it has enough variations there to make it a non-trivial exercise. Would you like to give that a try as well, and open a new PR for that? You're getting quite a workout for your first contribution! |
@dmethvin Sure, I'll do the same for 1.x-master. Thanks! Happy to help 👍 |
All unit tests that were changed are passing. JShint done without errors. Pull request fixes this ticket: http://bugs.jquery.com/ticket/14040