Commit Graph

77 Commits

Author SHA1 Message Date
abnud1
c349818742 Build: Update test code for compatibility with QUnit 2.x (#4297)
Also, run `grunt npmcopy` to sync the "external" directory with dependencies
from package.json. For example, the Sinon library version didn't match.

Ref gh-4234
Closes gh-4297
2019-02-18 19:03:26 +01:00
Richard Gibson
928c580a1a Tests: Reduce the abort timeout for simple focus testing
Ref gh-3732
2017-07-19 11:45:03 -04:00
Richard Gibson
bb79f728b0 Tests: Attach test iframes to the body for visibility-dependent code
Ref 1d2df772b4
Closes gh-3645
2017-04-25 15:39:41 -04:00
Manoj Kumar
1b9575b9d1 Core: Deprecate jQuery.isArray
Fixes gh-2961
Closes gh-3278
2016-11-30 12:22:24 +01:00
Oleg Gaidarenko
c8d15a2f9f Tests: further improvements QUnit 2.0 migration
* Remove QUnit jshint globals
* Extend QUnit.assert methods
* Use assert.async instead of start/stop/done

Ref b930d14ce6
2015-09-08 04:06:20 +03:00
Oleg Gaidarenko
10fdad742a Build: Update jscs and lint files
Fixes gh-2056
2015-09-07 20:03:50 +03:00
Michał Gołębiowski
ff18d8e206 Tests: Increase QUnit timeout
Android 2.3 is very slow & times out a lot in async tests, they have to be
restarted multiple times to settle. Long test execution is not a huge problem
as Android 2.3 is tested only periodically during the night, unstable tests
are a bigger problem. This might mitigate that.

In a regular scenario almost all tests should pass so increasing the timeout
for all browsers shouldn't have a huge impact on overall test time.

Closes gh-2232
2015-04-27 20:27:05 +02:00
Richard Gibson
26276a307c Tests: Minor updates for QUnit 1.16 compatibility
More to come later.

(cherry picked from commit f6f8848fbe)
2014-12-05 12:34:17 -05:00
Timmy Willison
c869a1ef8a Build: update grunt-jscs-checker and pass with the new rules 2014-07-17 10:25:59 -07:00
Oleg Gaidarenko
95dfcc50ed Build: Fix code style issue
Remove needless empty line character
2014-04-15 18:06:18 +04:00
Oleg Gaidarenko
1dedd3185e Tests: Bring back some of the clean-up logic 2014-04-15 17:46:00 +04:00
Oleg Gaidarenko
9475e31d32 Tests: Do global clean up in teardown function 2014-04-15 17:45:59 +04:00
Oleg Gaidarenko
3dee2983ab Build: Use jscs to check test helpers
Also fix issues found by jscs
2014-04-15 17:45:59 +04:00
Oleg Gaidarenko
8e5d1caf7a Tests: More improvments for testrunner
Conform to style guide and simplify it
2014-04-15 17:45:58 +04:00
Oleg Gaidarenko
92cff8b1a3 Tests: Remove Sizzle intergration tests
Fixes #14818
2014-04-15 17:45:58 +04:00
Oleg Gaidarenko
a7c9facc35 Tests: Simplify globals cleanup 2014-04-15 17:45:58 +04:00
Oleg Gaidarenko
7149726485 Tests: Remove QUnit start hook 2014-04-15 17:45:58 +04:00
Oleg Gaidarenko
e0b606d2bd Tests: Remove uselss "keys" helper 2014-04-15 17:45:58 +04:00
Oleg Gaidarenko
b26628a2bb Tests: Simplify "testTimeout" option 2014-04-15 17:45:58 +04:00
Oleg
38c122a73a Tests: Remove one of the checks for memory leak
This check is redundant since jQuery.fragments object does not exist anymore
2014-01-14 22:01:39 +04:00
cjqed
537e9ced61 Tests: Avoid use of QUnit.reset() in tests by splitting them
Fix #14040
Close gh-1457
2013-12-23 17:21:22 -05:00
Richard Gibson
13d58a9bec No ticket: Fix subproject iframe tests 2013-10-11 15:08:07 -04:00
Timmy Willison
5093b89f08 Convert testrunner to an AMD module and ensure jQuery is on the page when executing the testrunner (another race condition amplified by swarm) 2013-09-06 17:11:32 -04:00
Timmy Willison
e563cd3414 Move test loader to testinit.js. Fix race condition with dependency loading. 2013-09-06 16:23:20 -04:00
Timmy Willison
6535cc599e Use requirejs to load the testswarm inject script 2013-09-06 15:44:59 -04:00
Richard Gibson
0c18520923 No ticket: Hide the testing-support jQuery from tests 2013-09-03 10:43:32 -04:00
Timmy Willison
004c1fc5bb Pass all tests (and load Sizzle fixture correctly) when loading with AMD 2013-08-29 16:18:17 -04:00
Timmy Willison
6318ae6ab9 AMD-ify jQuery sourcegit s! Woo! Fixes #14113, #14163. 2013-08-15 14:15:49 -04:00
Timmy Willison
0fa52c11cb Update jshintrc to conform to new style guide. Conform to onevar and unused in tests. Fixes #13755. 2013-04-09 11:59:31 -04:00
Richard Gibson
59f5adb622 No ticket: Revise unit tests in anticipation of Sizzle-free builds 2013-02-22 20:13:36 -05:00
Rick Waldron
7f94a5cc3a 2.0: Rewrite data.js (Incl. event, manipulation, tests) 2013-02-03 15:27:55 -05:00
Dave Methvin
445dbd9d95 Revert data.js rewrite.
Reverts the following commits:

commit f717226b3a
Author: Rick Waldron <waldron.rick@gmail.com>
Date:   Mon Dec 31 18:06:38 2012 -0500

Only splice from internal arrays when item actually exists.

commit b9cdc4136b
Author: Rick Waldron <waldron.rick@gmail.com>
Date:   Mon Dec 31 16:20:35 2012 -0500

Updates to data.js re-write to pass events and manipulation

commit d1de3000c6
Author: Rick Waldron <waldron.rick@gmail.com>
Date:   Mon Dec 31 15:09:45 2012 -0500

2.0: Rewrite data.js
2013-01-03 20:43:01 -05:00
Rick Waldron
d1de3000c6 2.0: Rewrite data.js
Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
2012-12-31 16:23:20 -05:00
Richard Gibson
2ea7876c25 Fix #13064: better test fixture cleanup. Close gh-1075. 2012-12-16 13:09:40 -05:00
Timo Tijhof
55313d32a2 Test: Update index.html to new QUnit format. Close gh-1061.
Depends on jquery/sizzle#177, included with the Sizzle submodule in this commit.
2012-12-10 21:48:20 -05:00
Timo Tijhof
cef044d82e Test: Remove fixtures from QUnit.done hook. Close gh-1069.
This fixes jquery/testswarm#197. These are currently removed from
the TestSwarm injector, however this is jQuery specific, and
should be done from this end instead.
2012-12-10 20:45:20 -05:00
Timo Tijhof
5dd8a90f73 Make compatible with jshint, lint test/data. Close gh-1043. 2012-12-06 13:46:37 -05:00
Richard Gibson
4ada325479 More improvements per @jaubourg 2012-12-03 11:32:19 -05:00
Richard Gibson
ad690f8151 Improvements per @jaubourg 2012-12-03 00:49:40 -05:00
Richard Gibson
5b9bf13439 No ticket: improve global variable/ajax request tracking 2012-12-02 23:32:16 -05:00
jaubourg
b9dfcfd736 sandboxes start for real this time (fixes test failures in IE) 2012-11-27 02:39:08 +01:00
jaubourg
d31cef38f2 Total revamping of the ajax unit tests 2012-11-26 03:31:19 +01:00
Richard Gibson
81b094b2c1 No ticket: update test suite to pass QUnit globals check in most environments. Close gh-1016. 2012-11-05 17:24:03 -05:00
Richard Gibson
14e1501b89 Fix testing of no-ajax custom builds 2012-11-01 00:40:27 -04:00
Timo Tijhof
36c9ecb0f5 Implement expectation test instead of using _removeData. Close gh-997.
* Removed inline usage of QUnit.reset() because it is messing with the
  expectation model as reset does .empty() which does a recursive cleanData
  on everything in #qunit-fixture, so any expectJqData above .reset() would
  fail negatively.

  Instead of calling reset inline, either updated the following assertions to
  take previous assertions' state into account, or broke the test() up into
  2 tests at the point where it would call QUnit.reset.

* After introducing the new memory leak discovery a whole bunch of tests were
  failing as they didn't clean up everything. However I didn't (yet) add
  QUnit.expectJqData calls all over the place because in most if not all of
  these cases it is valid data storage. For example in test "data()", there
  will be an internal data key for "parsedAttrs". This particular test isn't
  intending to test for memory leaks, so therefor I made the new discovery
  system only push failures when the test contains at least 1 call to
  QUnit.expectJqData.

  When not, we'll assume that whatever data is being stored is acceptable
  because the relevant elements still exist in the DOM anyway (QUnit.reset
  will remove the elements and clean up the data automatically).

  I did add a "Always check jQuery.data" mode in the test suite that will
  trigger it everywhere. Maybe one day we'll include a call to everywhere,
  but for now I'm keeping the status quo: Only consider data left in storage
  to be a problem if the test says so ("opt-in").

* Had to move #fx-tests inside the fixture because ".remove()" test would
  otherwise remove stuff permanently and cause random other tests to fail
  as "#hide div" would yield an empty collection.
  (Why wasn't this in the fixture in the first place?)

  As a result moving fx-tests into the fixture a whole bunch of tests failed
  that relied on arbitrary stuff about the document-wide or fixture-wide
  state (e.g. number of divs etc.). So I had to adjust various tests to
  limit their sample data to not be so variable and unlimited...

* Moved out tests for expando cleanup into a separate test.

* Fixed implied global variable 'pass' in effects.js that was causing
  "TypeError: boolean is not a function" in *UNRELATED* dimensions.js that
  uses a global variable "pass = function () {};" ...

* Removed spurious calls to _removeData. The new test exposed various failures
  e.g. where div[0] isn't being assigned any data anyway.
  (queue.js and attributes.js toggleClass).

* Removed spurious clean up at the bottom of test() functions that are
  already covered by the teardown (calling QUnit.reset or removeClass to
  supposedly undo any changes).

* Documented the parentheses-less magic line in toggleClass. It appeared that
  it would always keep the current class name if there was any (since the
  assignment started with "this.className || ...".

  Adding parentheses + spacing is 8 bytes (though only 1 in gzip apparently).
  Only added the comment for now, though I prefer clarity with logical
  operators, I'd rather not face the yayMinPD[1] in this test-related commit.

* Updated QUnit urlConfig to the new format (raw string is deprecated).

* Clean up odd htmlentities in test titles, QUnit escapes this.
  (^\s+test\(.*)(&gt\;) → $1>
  (^\s+test\(.*)(&lt\;) → $1<

[1] jQuery MinJsGz Release Police Department (do the same, download less)
2012-10-28 22:44:57 -04:00
Richard Gibson
c31539c8a2 no ticket: fix jQuery suite failure on Android 2012-10-17 15:20:50 -04:00
Rick Waldron
611d7660cd Remove duplicate expect. Add QUnit.config.requireExpects to testrunner.js QUnit configurations. 2012-10-15 12:31:27 -04:00
Timo Tijhof
7e8b854152 Test: Clean up and fix misc issues
* Clean up testinit and testrunner

* Uncomment isLocal (at least make sure it is declared)

* Rephrase environment assertions to make sense if one reads
  them when they pass.

* Optimise an expensive loop that might be the cause of this
  in IE6: http://cl.ly/image/3f20053m112n
2012-10-09 20:06:31 -04:00
Dave Methvin
2b2ca8baa3 Don't expect QUnit to clean up jQuery internal data. Close gh-883. 2012-08-19 21:09:13 -04:00
Richard Gibson
ff7a434562 Really support subproject tests in testswarm, closes gh-868 2012-07-22 21:49:39 -04:00