-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Tests: Shift all tests to use no globals #1577
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
Conversation
For the Intern migration this looks good. For the full migration to the QUnit 2.0 API its still missing asyncTest(), which I've filed an issue for in the underlying tool: apsdehal/qunit-migrate#4 We still have a work-in-progress PR that changes all test defines (#1569) and one that changes a ton of tests for one widget (#1513). @arschmitz tells me that the changes here are all automated, so to avoid merge conflicts we should land the other two PRs first (should happen in the next two weeks), then apply the automatic changes once more to do the migration. |
@apsdehal we've landed the button rewrite in master. And you've addressed the |
Will do it ASAP. |
@apsdehal I see you pushed some updated a few days ago. Is this now ready for another review? |
@scottgonzalez No, not yet. I will ping you whenever this is ready. |
af0d9c4
to
47f2c1e
Compare
@scottgonzalez It is ready for a round of review. Only test failing is one in effects, which if I change to asyncTest back works smoothly. |
The issue is in the ".hide() with step" test in effects/core.js, which passes |
@jzaefferer Issue has been fixed now and the build is passing. |
I don't now why GitHub instantly marks by diff comment as outdated. So:
Could you convert the expect argument to assert.expect calls as well? |
@jzaefferer Fixed. |
I guess those 2 instances were the only ones still in master, nice. |
Yes, I ran a regex check on the whole repo. Those were the only two. |
expect( 1 ); | ||
QUnit.test( "JSHint", function( assert ) { | ||
var ready = assert.async(); | ||
require( [ "jshint" ], function() { |
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.
Convert indentation to tabs.
Please add a commit at the end that removes all the QUnit globals from Line 20 in 435ed7e
|
@scottgonzalez I have addressed your comments. |
Testing against custom QUnit build (pre-2.0) based on qunitjs/qunit#976
At least There might be other failures, but its hard to tell with the many errors coming from @apsdehal would you be interested in patching qunit-composite, qunit-assert-close or both? That would help a lot. |
@jzaefferer Sure, will do it! |
@scottgonzalez updating those externals shouldn't block this, after all the PR works just fine, and QUnit 2.0 isn't even released. Based on my testing with QUnit pre-2.0, the changes here work fine. Unless I'm missing something, we can merge this and release rc2. (I'm not sure why I thought that rc2 should wait). |
@jzaefferer I'm not sure what externals you're referring to. Did you mean the globals? @apsdehal already removed them from the JSHint config. I asked for that to be part of this PR to ensure that none of the globals were missed during the update. |
Thanks a lot @apsdehal! |
This PR shifts all the tests to use no global QUnit variables and methods.