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

Tests: Add support for running unit test via Grunt with Karma #3744

Closed
wants to merge 7 commits into
base: master
from

Conversation

Projects
None yet
5 participants
@Krinkle
Member

Krinkle commented Aug 1, 2017

Summary

  • Register grunt karma:main task that runs tests via Karma.
  • Add grunt karma:main to npm test by default.
  • Create new Node.js middleware that implements the same mocked responses as currently implemented in PHP.

screen shot

Checklist

* Add 'grunt karma:main' task that runs tests via Karma.
  - Karma uses its own server and uses its own HTML page by default.
    All files to be served are registered, and for the most part also
    loaded ("included") through Karma.
  - Use the 'customContextFile' option, because:
    * Preserve the qunit-fixture we have.
    * Workaround karma-qunit bug.
  - Use the 'customDebugFile' option, because (above reasons) and:
    * Create 'qunit' element and load QUnit CSS styles for easier debugging.

* Base URI
  - Karma opens at /context.html and serves test/ files from /base/test/.
    This is incompatible with our manual run which is at /test/index.html.
  - Using a <base href> tag with "/base/test/" fixed most tests when trying
    it out, but still caused three problems:
    1. While <base href> fixes native expansion (e.g. in HTML attributes,
       in CSS, and when passed to XHR), it did affect in-JS expansion in
       our tests, which use hacks based on location.href (e.g. for <a>
       property tests in unit/basic.js, and creation of absolute urls
       by unit/ajax.js).
       Fix those by introducing a prependUrlBase() function that prepends
       document.baseURI instead of location.href
    2. A test in unit/manipulation.js clicks on an anchor link. This broke
       the test entirely by navigating away from the test page since href="#2"
       would now expand to /base/test/#2.
       Fix those by:
       - Remove the <base> tag again.
       - Revert the logic in prependUrlBase() to how it used to be inlined.
       - Remove prependUrlBase() from basic/attributes test.
       - Instead, fix url() to have baseURL be "/base/test/" when in Karma.
       - Apply url() to bare urls:
         - unit/core.js (globalEval test)
         - unit/support.js (csp test)

* In addition to all the above, the most time-consuming part still was making
  the Ajax tests pass because they currently assume being served from
  Apache with mod_php installed.
  I originally planned on addressing this by starting another Node server
  before Karma starts, somehow injecting its url, and stopping it after Karma.
  Instead, let's try to use Karma's support for middleware to (hopefully)
  make this prettier.

Fixes #1999.

@mention-bot

This comment has been minimized.

Show comment
Hide comment
@mention-bot

mention-bot Aug 1, 2017

@Krinkle, thanks for your PR! By analyzing the history of the files in this pull request, we identified @timmywil, @CDAGaming and @all3fox to be potential reviewers.

mention-bot commented Aug 1, 2017

@Krinkle, thanks for your PR! By analyzing the history of the files in this pull request, we identified @timmywil, @CDAGaming and @all3fox to be potential reviewers.

@Krinkle

This comment has been minimized.

Show comment
Hide comment
@Krinkle

Krinkle Aug 1, 2017

Member

The tests are passing to show that the basic infrastructure works, but the majority of Ajax tests has not been ported yet (passing because I commented them out). There are also a number of tests outside unit/ajax.js that depend on PHP (unit/support.js and unit/basic.js, for example) - which have all been ported.

Looking for further feedback before I port the rest.

/cc @mgol, @markelog, @jaubourg, @timmywil

Member

Krinkle commented Aug 1, 2017

The tests are passing to show that the basic infrastructure works, but the majority of Ajax tests has not been ported yet (passing because I commented them out). There are also a number of tests outside unit/ajax.js that depend on PHP (unit/support.js and unit/basic.js, for example) - which have all been ported.

Looking for further feedback before I port the rest.

/cc @mgol, @markelog, @jaubourg, @timmywil

Show outdated Hide outdated package.json Outdated
@mgol

This comment has been minimized.

Show comment
Hide comment
@mgol

mgol Aug 1, 2017

Member

This is awesome, @Krinkle. 👏

I think it's fine that Karma tests don't run AJAX tests for the time being, it still helps in the majority
of cases. We just need to make sure that the old way of running tests still works as long as we don't support everything.

We should strive to reduce duplication, though, in the current state of the PR a lot of HTML fixtures are repeated in various files.

Member

mgol commented Aug 1, 2017

This is awesome, @Krinkle. 👏

I think it's fine that Karma tests don't run AJAX tests for the time being, it still helps in the majority
of cases. We just need to make sure that the old way of running tests still works as long as we don't support everything.

We should strive to reduce duplication, though, in the current state of the PR a lot of HTML fixtures are repeated in various files.

Show outdated Hide outdated test/middleware-mockserver.js Outdated
@Krinkle

This comment has been minimized.

Show comment
Hide comment
@Krinkle

Krinkle Aug 1, 2017

Member

@mgol Regarding fixture duplication, I agree. I'll try and generate these automatically in some way with a precommit/pretest Grunt task perhaps.

I'd actually much prefer to move it to a separate file (e.g. fixture.html) and generate a JS file that sets QUnit.confix.fixture = %fixture;. That way we can simply include that JS file in the three entry points. And we'd have to generate only 1 file instead of 3.

The main reason this isn't viable at the moment is because of traversal tests depending on #qunit-fixture being a child ofdl#dl. I find it hard to believe this parent element was added for that test, rather, it's probably an old relic no longer used, except that this test had to be written with that parent element because its one of the parent elements (unavoidable).

I'll get rid of that as well, in a separate commit before this one.

Member

Krinkle commented Aug 1, 2017

@mgol Regarding fixture duplication, I agree. I'll try and generate these automatically in some way with a precommit/pretest Grunt task perhaps.

I'd actually much prefer to move it to a separate file (e.g. fixture.html) and generate a JS file that sets QUnit.confix.fixture = %fixture;. That way we can simply include that JS file in the three entry points. And we'd have to generate only 1 file instead of 3.

The main reason this isn't viable at the moment is because of traversal tests depending on #qunit-fixture being a child ofdl#dl. I find it hard to believe this parent element was added for that test, rather, it's probably an old relic no longer used, except that this test had to be written with that parent element because its one of the parent elements (unavoidable).

I'll get rid of that as well, in a separate commit before this one.

Krinkle added a commit to Krinkle/jquery that referenced this pull request Aug 1, 2017

Tests: Update QUnit from 1.20 to 1.23
The previous QUnit updates since b97c8d3 were ineffective as they only
updated package.json (and unused files in node_modules), but did not run
'grunt npmcopy' or commit the actually used files in external/.

Move the version back from 2.4.0 to 1.23.1 and actually run npmcopy.
An update to 2.x should happen at some point, but let's first go to a
newer 1.x version that fixes minor bugs for jquerygh-3744, without requiring
any updates to the tests.

Also revert ineffective updates to qunit-assert-step back to the version
actually in use.

Krinkle added a commit to Krinkle/jquery that referenced this pull request Aug 1, 2017

Tests: Remove unused dl#dl from test/index.html
This non-standard wrapper around #qunit-fixture makes the tests
needlessly complicated to run. This is needed for jquery#3744, so that
we can easily run the tests from another entry point.

Krinkle added a commit to Krinkle/jquery that referenced this pull request Aug 1, 2017

Tests: Move qunit-fixture to a separate file
In preparation for jquery#3744, so that we can easily reuse the fixture
from multiple entry points (e.g. test/index.html, Karma context,
and Karma debug).

Setting QUnit.config.fixture is a QUnit 2.x fixture, so for now
also set it back into the element at run-time.

Krinkle added a commit to Krinkle/jquery that referenced this pull request Aug 2, 2017

Tests: Add support for running unit test via Grunt with Karma
* Add 'grunt karma:main' task that runs tests via Karma.
  - Karma uses its own server and uses its own HTML page by default.
    All files to be served are registered, and for the most part also
    loaded ("included") through Karma.
  - Use the 'customContextFile' option, because:
    * Preserve the qunit-fixture we have.
    * Workaround karma-qunit bug.
  - Use the 'customDebugFile' option, because (above reasons) and:
    * Create 'qunit' element and load QUnit CSS styles for easier debugging.

* Move definition of 'isSwarm' and 'basicTests' out of loadTests(), given
  Karma will run without that function.

* In addition to all the above, start porting some of the PHP mocks to Node.js.
  (The Ajax tests currently assume being served from Apache with mod_php.).
  I originally planned on addressing this by starting another Node server
  before Karma starts, somehow injecting its url, and stopping it after Karma.
  Instead, let's try to use Karma's support for middleware to (hopefully)
  make this prettier.

Ref issue jquerygh-1999, pull jquerygh-3744.
@Krinkle

This comment has been minimized.

Show comment
Hide comment
@Krinkle

Krinkle Aug 2, 2017

Member

@mgol Up and ready for further review.

Member

Krinkle commented Aug 2, 2017

@mgol Up and ready for further review.

@mgol

This comment has been minimized.

Show comment
Hide comment
@mgol

mgol Aug 2, 2017

Member
Member

mgol commented Aug 2, 2017

@gibson042

gibson042 requested changes Aug 14, 2017 edited

This PR is great; thanks so much!

Could you also replace use of 404.txt, 404.html, and someFileThatDoesNotExist.html in test/unit/ajax.js so the console isn't polluted with irrelevant warnings?

<!DOCTYPE html>
<html lang="en" id="html">
<head>
%X_UA_COMPATIBLE%

This comment has been minimized.

@gibson042

gibson042 Aug 14, 2017

Member

What is the purpose of this? It doesn't appear in karma.context.html.

@gibson042

gibson042 Aug 14, 2017

Member

What is the purpose of this? It doesn't appear in karma.context.html.

This comment has been minimized.

@Krinkle

Krinkle Aug 15, 2017

Member

It's there by default in Karma's debugContextFile, which this file is a derivative of. I don't why don't have it in their non-debug file by default.

@Krinkle

Krinkle Aug 15, 2017

Member

It's there by default in Karma's debugContextFile, which this file is a derivative of. I don't why don't have it in their non-debug file by default.

<script src="/context.js"></script>
<script src="/debug.js"></script>
<script>
%CLIENT_CONFIG%

This comment has been minimized.

@gibson042

gibson042 Aug 14, 2017

Member

And this is missing window.__karma__.setupContext(window)... it would be great to unify these two files, but I don't see anything in Karma that allows a "debug" signal through (e.g., an %IS_DEBUG% directive).

@gibson042

gibson042 Aug 14, 2017

Member

And this is missing window.__karma__.setupContext(window)... it would be great to unify these two files, but I don't see anything in Karma that allows a "debug" signal through (e.g., an %IS_DEBUG% directive).

This comment has been minimized.

@gibson042

gibson042 Aug 14, 2017

Member

Update: though we could use a kludgy test like /^[/]debug\b/.test( location.pathname ).

@gibson042

gibson042 Aug 14, 2017

Member

Update: though we could use a kludgy test like /^[/]debug\b/.test( location.pathname ).

"test/unit/tween.js",
"test/unit/ready.js",
{ pattern: "dist/jquery.js", included: false, served: true },

This comment has been minimized.

@gibson042

gibson042 Aug 14, 2017

Member

How do we actually take advantage of this to test unminified code?

@gibson042

gibson042 Aug 14, 2017

Member

How do we actually take advantage of this to test unminified code?

This comment has been minimized.

@Krinkle

Krinkle Aug 18, 2017

Member

That'll be a future improvement, but the way it would work is basically you create another karma task, one like the current one that includes dist/jquery.min.js in files and one that includes dist/jquery.js instead.

I had to whiltelist the file even in the current Grunt karma task because one of the iframes we load in the tests load test/jquery.js, which then loads dist/jquery.js in some cases.

@Krinkle

Krinkle Aug 18, 2017

Member

That'll be a future improvement, but the way it would work is basically you create another karma task, one like the current one that includes dist/jquery.min.js in files and one that includes dist/jquery.js instead.

I had to whiltelist the file even in the current Grunt karma task because one of the iframes we load in the tests load test/jquery.js, which then loads dist/jquery.js in some cases.

Show outdated Hide outdated test/data/mock.php Outdated
public function respond( stdClass $req ) {
if ( !isset( $req->query['action'] ) || !method_exists( $this, $req->query['action'] ) ) {
header( "HTTP/1.0 400 Bad Request" );

This comment has been minimized.

@gibson042

gibson042 Aug 14, 2017

Member

TIL more about PHP than I ever wanted to.

@gibson042

gibson042 Aug 14, 2017

Member

TIL more about PHP than I ever wanted to.

Show outdated Hide outdated test/data/mock.php Outdated
$this->cspFile = __DIR__ . '/support/csp.log';
}
public function respond( stdClass $req ) {

This comment has been minimized.

@gibson042

gibson042 Aug 14, 2017

Member

TODO: write a generic handler covering 80% of cases by responding to requests that specify delay, headers, and content body, e.g.

?wait=1&header=Content-Type:text/plain&content=foo%0Abar

or

?header=Content-Security-Policy:default-src+'self';+report-uri+./mock.php?action=cspLog&header=Content-Type:text/html&contentFile=csp.include.html
@gibson042

gibson042 Aug 14, 2017

Member

TODO: write a generic handler covering 80% of cases by responding to requests that specify delay, headers, and content body, e.g.

?wait=1&header=Content-Type:text/plain&content=foo%0Abar

or

?header=Content-Security-Policy:default-src+'self';+report-uri+./mock.php?action=cspLog&header=Content-Type:text/html&contentFile=csp.include.html

This comment has been minimized.

@Krinkle

Krinkle Aug 18, 2017

Member

I've already narrowed down the number of different response handlers from what it originally was. Any additional improvements can be done later instead of blocking this pull.

I do not, however, that we don't currently have cases where we need multiple of wait, header and content. Indicated by there not being any such method right now that does multiple. It's pretty well-isolated. Making it more generic and changing the actual fixtures used would be better, but that also requires more careful examination of what the tests are actually testing and what they need. For example, some tests probably don't need the exact output they get right now.

@Krinkle

Krinkle Aug 18, 2017

Member

I've already narrowed down the number of different response handlers from what it originally was. Any additional improvements can be done later instead of blocking this pull.

I do not, however, that we don't currently have cases where we need multiple of wait, header and content. Indicated by there not being any such method right now that does multiple. It's pretty well-isolated. Making it more generic and changing the actual fixtures used would be better, but that also requires more careful examination of what the tests are actually testing and what they need. For example, some tests probably don't need the exact output they get right now.

Show outdated Hide outdated test/middleware-mockserver.js Outdated
@mgol

This comment has been minimized.

Show comment
Hide comment
@mgol

mgol Aug 16, 2017

Member

I'm sorry, it seems I won't have enough time to review this properly. Once @gibson042 approves the PR it's fine for me to land and we can improve on that in future PRs.

Member

mgol commented Aug 16, 2017

I'm sorry, it seems I won't have enough time to review this properly. Once @gibson042 approves the PR it's fine for me to land and we can improve on that in future PRs.

@mgol

This comment has been minimized.

Show comment
Hide comment
@mgol

mgol Aug 16, 2017

Member

@Krinkle did you just fix the QUnit node_modules to external mapping or did you run the full grunt npmcopy to make sure all libs are correct?

Member

mgol commented Aug 16, 2017

@Krinkle did you just fix the QUnit node_modules to external mapping or did you run the full grunt npmcopy to make sure all libs are correct?

@Krinkle

This comment has been minimized.

Show comment
Hide comment
@Krinkle

Krinkle Aug 16, 2017

Member

Thanks, I'll address the issues raised by @gibson042.

@mgol Commit 6b5debe only fixes the state of qunitjs for npmcopy. Running grunt npmcopy no longer dirties qunitjs, but it does still dirty some of the others (which is a pre-existing issue).

Member

Krinkle commented Aug 16, 2017

Thanks, I'll address the issues raised by @gibson042.

@mgol Commit 6b5debe only fixes the state of qunitjs for npmcopy. Running grunt npmcopy no longer dirties qunitjs, but it does still dirty some of the others (which is a pre-existing issue).

Krinkle added some commits Aug 1, 2017

Tests: Add support for running unit test via Grunt with Karma
* Add 'grunt karma:main' task that runs tests via Karma.
  - Karma uses its own server and uses its own HTML page by default.
    All files to be served are registered, and for the most part also
    loaded ("included") through Karma.
  - Use the 'customContextFile' option, because:
    * Preserve the qunit-fixture we have.
    * Workaround karma-qunit bug.
  - Use the 'customDebugFile' option, because (above reasons) and:
    * Create 'qunit' element and load QUnit CSS styles for easier debugging.

* Move definition of 'isSwarm' and 'basicTests' out of loadTests(), given
  Karma will run without that function.

* In addition to all the above, start porting some of the PHP mocks to Node.js.
  (The Ajax tests currently assume being served from Apache with mod_php.).
  I originally planned on addressing this by starting another Node server
  before Karma starts, somehow injecting its url, and stopping it after Karma.
  Instead, let's try to use Karma's support for middleware to (hopefully)
  make this prettier.

Ref issue gh-1999, pull gh-3744.
Tests: Update QUnit from 1.20 to 1.23
The previous QUnit updates since b97c8d3 were ineffective as they only
updated package.json (and unused files in node_modules), but did not run
'grunt npmcopy' or commit the actually used files in external/.

Move the version back from 2.4.0 to 1.23.1 and actually run npmcopy.
An update to 2.x should happen at some point, but let's first go to a
newer 1.x version that fixes minor bugs for gh-3744, without requiring
any updates to the tests.

Also revert ineffective updates to qunit-assert-step back to the version
actually in use.
Tests: Remove unused dl#dl from test/index.html
This non-standard wrapper around #qunit-fixture makes the tests
needlessly complicated to run. This is needed for #3744, so that
we can easily run the tests from another entry point.
Tests: Move qunit-fixture to a separate file
In preparation for #3744, so that we can easily reuse the fixture
from multiple entry points (e.g. test/index.html, Karma context,
and Karma debug).

Setting QUnit.config.fixture is a QUnit 2.x fixture, so for now
also set it back into the element at run-time.
Tests: Remove unused map#imgmap from test/index.html
Only used by 1 test (unit/offset.js), move it to there instead.
Tests: Ensure all urls to data use baseURI
Various urls were missing this prefix, either explicitly or via url().
This commit fixes the odd ones that were missing the prefix, which
was causing some tests to fail under Karma runner, where the base
is different because tests are served from root (/), but files
are served from /base (e.g. /base/test/data).

Also, to avoid regressing this in the future, change baseURI to
be the path to /test/data instead of the path to /test so that
it doesn't silently make tests without it pass when run from
/test/index.html.
Tests: Centralise PHP mocks and complete JS middleware port
* Merge all PHP stubs into one MockServer class.
* Complete the middleware-mockserver.js port (Node.js equivalent).

Notes:
* Merge action=script, and action=evalScript. (Similar)
* Merge action=wait, action=longLoadScript, action=dont_return. (Similar)
* Merge action=status, and action=nocontent. (Similar)
* Renamed text.php to text.txt. (No PHP code)
* Merge references to 404.php, 404.html, and someFileThatDoesNotExist.html
  to 404.txt, and add a handler for the latter to test middleware
  to avoid warnings in the Karma server output.
* Remove data/test.php. (Unused)

Now that all tests pass, also add 'grunt karma:main' to npm test (for use
in local development and on Travis CI).

Also add a separate 'npm run jenkins' for use on jenkins.jquery.com where
we won't run Chrome (runs TestSwarm instead).

Fixes #1999.
@Krinkle

This comment has been minimized.

Show comment
Hide comment
@Krinkle

Krinkle Aug 18, 2017

Member

@gibson042 Fix ups:

  • Added trailing new lines to various responses.
  • Changed references to 404.html, 404.php and someFileThatDoesNotExist.html to use 404.txt instead, and added a handler for it in the mock server.
Member

Krinkle commented Aug 18, 2017

@gibson042 Fix ups:

  • Added trailing new lines to various responses.
  • Changed references to 404.html, 404.php and someFileThatDoesNotExist.html to use 404.txt instead, and added a handler for it in the mock server.

@timmywil timmywil closed this in ecd8dde Dec 18, 2017

mgol added a commit to mgol/jquery that referenced this pull request Dec 18, 2017

@mgol mgol referenced this pull request Dec 18, 2017

Merged

Build: Only run browser tests in one Node version on Travis #3894

2 of 2 tasks complete

@Krinkle Krinkle deleted the Krinkle:karma branch Dec 18, 2017

mgol added a commit to mgol/jquery that referenced this pull request Dec 18, 2017

mgol added a commit to mgol/jquery that referenced this pull request Dec 18, 2017

@mgol

This comment has been minimized.

Show comment
Hide comment
@mgol

mgol Dec 18, 2017

Member

@Krinkle @timmywil AJAX tests fail after this PR has been merged: http://swarm.jquery.org/job/6563.

Member

mgol commented Dec 18, 2017

@Krinkle @timmywil AJAX tests fail after this PR has been merged: http://swarm.jquery.org/job/6563.

mgol added a commit that referenced this pull request Jan 3, 2018

@GulajavaMinistudio GulajavaMinistudio referenced this pull request Jan 3, 2018

Merged

Update upstream #34

0 of 4 tasks complete
@markelog

This comment has been minimized.

Show comment
Hide comment
@markelog

markelog Jan 4, 2018

Member

For me commands grunt karma:firefox & grunt karma:chrome do not work, browsers open up but after that it holds.

grunt karma:main works fine. I'm I doing something wrong? If those commands are not intended to work I think they should be removed...

Member

markelog commented Jan 4, 2018

For me commands grunt karma:firefox & grunt karma:chrome do not work, browsers open up but after that it holds.

grunt karma:main works fine. I'm I doing something wrong? If those commands are not intended to work I think they should be removed...

@mgol

This comment has been minimized.

Show comment
Hide comment
@mgol

mgol Jan 4, 2018

Member

For me commands grunt karma:firefox & grunt karma:chrome do not work, browsers open up but after that it holds.

Same for me. @Krinkle, is that a leftover config?

Member

mgol commented Jan 4, 2018

For me commands grunt karma:firefox & grunt karma:chrome do not work, browsers open up but after that it holds.

Same for me. @Krinkle, is that a leftover config?

@Krinkle

This comment has been minimized.

Show comment
Hide comment
@Krinkle

Krinkle Jan 4, 2018

Member

They're not leftover, but I'll look into why they aren't working. Let's continue the conversation at #3922.

Member

Krinkle commented Jan 4, 2018

They're not leftover, but I'll look into why they aren't working. Let's continue the conversation at #3922.

immpo added a commit to immpo/jquery that referenced this pull request Feb 3, 2018

up (#1)
* Dimensions: ignore transforms when retrieving width/height

Close gh-3561
Fixes gh-3193

* CSS: remove dead code in getWidthOrHeight

- getCSS already falls back to inline styles

Ref gh-3561

* Release: update release dependencies

* Release: update AUTHORS.txt

* Release: update version to 3.2.0-pre

* Release: md5sum -> md5 -r for MAC

* Build: Updating the master version to 3.2.1-pre.

* Release: edit dist README version on release

Fixes gh-3574

* Build: update PR template

- Comment out things we don't need to see in the PR description
- Change CLA link

* Tests: move readywait to an iframe test

Close gh-3576
Fixes gh-3573

* Dimensions: fall back to offsetWidth/Height for inline elems

Close gh-3577
Fixes gh-3571

* Revert "Event: Trigger checkbox and radio click events identically"

This reverts commit b442aba.

* Revert "Event: Add radio click triggering tests"

This reverts commit 5f35b5b.

* Tests: add test for passing trigger data to radio click handler

Close gh-3581
Fixes gh-3579

* Build: Updating the master version to 3.2.2-pre.

* CSS: retrieve inline style before computed

- Fixes an issue with getting computed style on detached elements

* Revert "Build: Updating the master version to 3.2.2-pre."

This reverts commit 066bd86.

* Build: Updating the master version to 3.2.2-pre.

* Tests: Fix incorrect assert name for ensure_iterability_es6

Closes gh-3584
Ref bb026fc.

* Docs: Update links to HTML spec for stripAndCollapse (#3594)

* Offset: Use correct offset parents; include all border/scroll values

Thanks @anseki

Fixes gh-3080
Fixes gh-3107
Closes gh-3096
Closes gh-3487

* Core: Update isFunction to handle unusual-@@toStringTag input

Ref gh-3597
Fixes gh-3600
Fixes gh-3596
Closes gh-3617

* Tests: Improve offset test setup and labels

Hopefully this fixes iOS testing: http://swarm.jquery.org/job/5226

Ref 1d2df77
Closes gh-3641

* Tests: Be even more async for iOS

Ref 1d2df77
Closes gh-3643

* Tests: Attach test iframes to the body for visibility-dependent code

Ref 1d2df77
Closes gh-3645

* Tests: Allow a mock QUnit.test for perfect testIframe fidelity

Ref 1d2df77
Closes gh-3647

* Tests: Prepend test iframes for even *more* consistency

Ref 1d2df77

* Tests: Reset iframe window scroll after updating html/document position

Ref 1d2df77
Closes gh-3649

* Tests: Add debugging to investigate iOS failures

Ref 1d2df77

* Tests: Keep iframes visible in TestSwarm

Ref 1d2df77

* Tests: Adjust by actual scroll position, rather than expected

Ref 1d2df77

* Tests: Clean up offset debugging

Ref 1d2df77
Ref c0edd8d

* Tests: Correct expected assertion count

Ref e94b5b0

* Tests: Revert some testIframe changes to fix dimensions tests

Ref c0edd8d

* Revert "Tests: Revert some testIframe changes to fix dimensions tests"

This reverts commit c4368a9.

* Tests: Revert some testIframe changes to fix dimensions tests

Ref c0edd8d

* CSS: Drop the float mapping from cssProps

Firefox 35 and newer support style.float directly.

Closes #3569

* Docs:Tests: Update IE/Edge-related support comments & tests

Closes gh-3661

* Build: Test on Node.js 8, stop testing on Node.js 7

* Tests: minor typos

Close gh-3671

* Dimensions: Include scroll gutter in "padding" box

Fixes gh-3589
Closes gh-3656

* Deferred: fix memory leak of promise callbacks

Fixes gh-3606
Closes gh-3657

* Build: update node dependencies; commit package-lock.json

- Also ignore yarn.lock
Close gh-3669

* Build: Update sinon, husky, and qunitjs

* Build: fix uglify options for uglify update

- Uses new typeofs option for compression
- See mishoo/UglifyJS2#2198

Close gh-3710

* Event: `stopPropagation()` on native event-handler

Fixes gh-3693
Close gh-3694

* Core: Deprecate jQuery.isWindow

Fixes gh-3629
Close gh-3702

* Test: ensure position/offset return mutable objects

Fixes gh-3612
Closes gh-3695

* Revert "Offset: Resolve strict mode ClientRect "no setter" exception"

This reverts commit 3befe59.

* Offset: fix error from bad merge in #3695

* Dimensions: Detect and account for content-box dimension mishandling

Fixes gh-3699
Closes gh-3700

* Support: Properly check for IE9 absolute scrollbox mishandling

Ref gh-3589
Fixes gh-3699
Fixes gh-3730
Closes gh-3729

* Tests: Try extra hard to control focus

Ref gh-3732

* Tests: Abort focus tests when the environment doesn't cooperate

Ref gh-3732

* Tests: Reduce the abort timeout for simple focus testing

Ref gh-3732

* Tests: Simulate events when CI hinders use of native ones

Ref gh-3732

* Tests: Account for TestSwarm focus issues

Closes gh-3732

* Ajax: add an ontimeout handler to all requests

Fixes gh-3586
Close gh-3590

* Dimensions: Improve offsetWidth/offsetHeight fallback

Fixes gh-3698
Fixes gh-3602
Closes gh-3738

* Tests: Replace non-ASCII whitespace in source code

* Dimensions: Don't trust non-pixel computed width/height

Fixes gh-3611
Closes gh-3741

* Build: Fix comment typo

Closes gh-3747

* Build: Update my name in .mailmap

I got married! 🎉

* Build: Update my name in ATHORS.txt

I forgot .mailmap isn't everything.

* Tests: Update path calculation

Fixes gh-3756
Closes gh-3757

* CSS: Avoid unit-conversion interference from CSS upper bounds

Fixes gh-2144
Closes gh-3745

* Tests: Update lineHeight adjustments to give Android more slop

* CSS: Detect more WebKit styles erroneously reported as percentages

Ref 692f9d4
Fixes gh-3777
Closes gh-3778

* Build: Update to Babel 7, use for-of plugin instead of preset-es2015

Closes gh-3786

* Build: Drop cross-spawn, use child_process.spawn shell option

* Build: increase timeout in Promises/A+ tests 10 times

The promises-aplus-tests sets up a default 200 ms Mocha timeout. This makes
our tests randomly fail on Jenkins. 2 seconds will be safer.

Closes gh-3791

* Build: Remove package-lock.json, add it to .gitignore

npm 5, even the version included in the latest Node.js 8.5.0 re-generates
`package-lock.json` on each install. And when it does on a system that doesn't
support all the optional dependencies that are supported on the OS where the
lockfile was generated, it removes those optional deps from the lockfile.

The effect is that everyone firing `npm install` on our repo on any OS other
than macOS will immediately get a dirty state of the repo as the `fsevents`
dependency subtree gets removed from `package-lock.json`. That's a really bad
experience.

This commit removes package-lock.json from the repository and adds it to
.gitignore. We'll start committing the file again once the issue is resolved
on npm's part.

Fixes gh-3792

* Tests: Make Node tests work for paths with spaces in them

Without this patch Jenkins tests fail as jQuery job names there contain spaces,
e.g. "jQuery Core".

Closes gh-3821

* Tests: Add Safari 11 support test results

* Build: Test on Node.js 9

Closes gh-3840

* Tests: Add iOS 11 support test results

* Manipulation: Reduce size by eliminating single-use variable

Closes gh-3851

* CSS: Correctly set support properties with non-default zoom

Fixes gh-3808
Closes gh-3872

* Docs: Create CODE_OF_CONDUCT.md

Close gh-3865

* Tests: Add support for running unit tests via grunt with karma

- Update QUnit to 1.23.1
- Remove unused dl#dl from test/index.html
- Remove unused map#imgmap from test/index.html
- Ensure all urls to data use baseURI
- Add the 'grunt karma:main' task
  - customContextFile & customDebugFile
- Add 'npm run jenkins' script

Close gh-3744
Fixes gh-1999

* Build: Only run browser tests in one Node version on Travis

Ref gh-3744
Closes gh-3894

* Core: make camelCase function available only for internal usage

Close gh-3604
Fixes gh-3384

* Core: adjust data tests to ensure proper camelCasing

- Add back camelCase to the public object (deprecate not remove)
Ref #3384

* Core: deprecate jQuery.now

Fixes gh-2959
Close gh-3884

* Core: deprecate jQuery.proxy (not slated for removal)

Fixes gh-2958
Close gh-3885

* Manipulation: use `.children` to select tbody elements

- selectors beginning with a child combinator are not valid natively.
  This fixes the tests when using selector-native.js

* Attributes: allow array param in add/remove/toggleClass

+30 bytes instead of +182

Thanks to @faisaliyk for the first pass on this feature.

Fixes gh-3532
Close gh-3917

* Ajax: add unit test for getScript(Object)

Fixes gh-3736
Close gh-3918

* Tests: only run ontimeout test if ontimeout exists

Fixes gh-3742
Close gh-3919

* Build: Fix UglifyJS output in Android 4.0; update uglify

- Thanks to @mgol for first pass

Fixes gh-3743
Close gh-3920

* Tests: fix function reference for unbinding

Ref gh-2958

* Build: Remove CRLF line endings to fix builds on Windows

Close gh-3929

* Core: deprecate jQuery.isFunction

Fixes gh-3609

* Event: Move event aliases to deprecated

Fixes gh-3214

* Ajax: Don't process non-string data property on no-entity-body requests

Fixes gh-3438
Closes gh-3781

* Core: deprecate jQuery.isNumeric

Fixes gh-2960
Closes gh-3888

* Tests: fix weird failure in Edge 16 CSS

Fixes gh-3866
Close gh-3932

* Tests: fix weird flaky attributes test in Edge 16

Fixes gh-3867
Close gh-3931

* Core: deprecate jQuery.type

Fixes gh-3605
Close gh-3895

* Tests: fix number of expected assertions in basic core

* Tests: temporarily require sudo access for karma:main on travis

- This should fix the broken travis build on Node 8
- See travis-ci/travis-ci#8836

* Tests: correctly set sudo in travis config, not karma config

* Manipulation: Add support for scripts with module type

Fixes gh-3871
Close gh-3869

* Tests: fix tests in AMD mode

* Tests: ensure that module assertions run on supported browsers

- Also fixes tests for karma, where the URL for the module is different

Ref gh-3871

* Filter: Use direct filter in winnow

for both simple and complex selectors

Fixes gh-3272
Closes gh-3910

* Build: Add "-debug" suffix to name of karma debug tasks

Ref gh-3922
Close gh-3936

* Tests: skip test with invalid selector for selector-native tests

* Release: add new authors to AUTHORS.txt

* Release: update version to 3.3.0-pre

* Build: Updating the master version to 3.3.1-pre.

* Build: Updating the master version to 3.3.2-pre.

@lock lock bot locked as resolved and limited conversation to collaborators Jul 3, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.