Commit Graph

77 Commits

Author SHA1 Message Date
Timmy Willison
52e24471c8
Core: expose noConflict in AMD mode
- For compability reasons, we had already added the global
  in AMD mode, but without noConflict. This adds back noConflict
  to AMD (which fixes noConflict mode in the tests).

Fixes gh-2930
2016-08-15 11:54:55 -04:00
Oleg Gaidarenko
58c6ca9822 Build: ESLint details
Use eslint pragmas, fix new errors, etc

Closes gh-3148
2016-06-11 10:41:33 +03:00
Dave Methvin
e5ffcb0838 Tests: Refactor testIframe() to make it DRYer and more consistent
Ref gh-3040
Closes gh-3049
2016-04-11 13:32:51 -04:00
Dave Methvin
08d73d7f9c Tests: Make iframe tests wait after checking isReady
Ref gh-3040
2016-04-11 13:29:11 -04:00
Oleg Gaidarenko
c158f5761a Tests: do not run IE9 effect tests if inside testswarm
That test doesn't work properly in such environment

Ref e04e246552
Fixes gh-2888
Closes gh-3034
2016-04-04 21:58:33 +03:00
Alexander Lisianoi
59ec78e602 Tests: Restrict "p > * > *" selection in selector.js to #qunit-fixture
Add `match` and `QUnit.assert.selectInFixture` functions that
mimic `QUnit.assert.t`.

Ref gh-2880
Closes gh-2973
2016-03-09 14:09:20 -05:00
Richard Gibson
0fb84fa8cc Tests: Keep test iframes around for assertions
Ref 44f8239d3f
Ref gh-2644
Ref gh-2390
2015-10-17 17:41:50 -04:00
Gary Ye
03eaadb131 Tests:Docs: Fix various typos
* Changes "baar" to "bar" when used with "foo" in readme
  and comments of js files

* mousenter -> mouseenter

Thanks @garysye, @KimTaehee

Closes gh-2613
Closes gh-2601
2015-10-12 18:08:13 +03:00
Dave Methvin
ee0854f85b Event: Move .bind() and .delegate() to deprecated
Fixes gh-2288
Closes gh-2624
2015-10-12 17:32:08 +03:00
Richard Gibson
f23a64d745 Tests: Use QUnit URL parameter parsing 2015-10-08 23:29:32 -04:00
Richard Gibson
f9af896bb8 Tests: Add dummy modules when running basic tests
Without this, other modules don't appear in the QUnit module picker.

Ref 855b0c8c28
Closes gh-2582
2015-10-08 23:26:03 -04:00
Michał Gołębiowski
1b566d37a2 Tests: Really fix tests in IE 8 this time
IE 8 doesn't have indexOf on arrays. Also, one toLowerCase() was missing. Oops.

This commit is not necessary on master but has been brought here to keep
tests similar in both branches.

(cherry-picked from 1b48eef4ca)
2015-09-08 19:02:35 +02:00
Michał Gołębiowski
855b0c8c28 Tests: Don't load non-basic tests when basic module is selected
When loading basic tests don't load any others to not overload Android 2.3.
The drawback is that most tests are not selectable in the module dropdown
when the basic module is seelcted.

Refs 2c7e9c9349
2015-09-08 18:36:42 +02:00
Michał Gołębiowski
2c7e9c9349 Tests: Add simple tests for Android 2.3
Fixes gh-2505
Closes gh-2509
Refs gh-2483
2015-09-08 18:03:49 +02: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
Oleg Gaidarenko
b930d14ce6 Tests: partially use new qunit interface
http://qunitjs.com/upgrade-guide-2.x/

For most of the boring work was used
https://github.com/apsdehal/qunit-migrate package

However, it can't update local qunit helpers, plus in some places
old QUnit.asyncTest signature is still used

Fixes gh-2540
2015-08-16 09:02:01 +03:00
Corey Frang
b3b2d6c3dd Effects: Adding unit tests for jQuery.Animation
Closes gh-2326
2015-06-26 20:06:03 -04:00
Corey Frang
cdaed15c7e Effects: Add tests for jQuery.Tween 2015-06-26 20:05:25 -04:00
Timmy Willison
cfe468f29c Core: re-introduce createHTMLDocument in parseHTML; Safari 8 left out
Close gh-1505
2014-12-10 09:51:30 -05:00
Timmy Willison
6051609df3 Build: fix tests in AMD mode 2014-12-09 15:39:24 -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
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
Timmy Willison
f9ad13c9ec Manage bower dependencies with grunt-bowercopy
Tracked bower dependencies are located at "src/sizzle" and "test/libs".
The source-destination mapping is in the Gruntfile.

When updating a bower dependency, update the version in bower.json, run
`grunt bower`, and then commit the result. When adding a dependency,
update the bowercopy task accordingly.

Fixes #14615.
Closes gh-1452.
2013-12-06 16:04:35 -05:00
Timmy Willison
ac7ff97f8b Use grunt and bower packages as local dependencies. Close gh-1433. 2013-11-14 10:17:18 -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
4ca5a0c691 No ticket: link testinit 2013-09-06 16:25:33 -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
Richard Gibson
0c18520923 No ticket: Hide the testing-support jQuery from tests 2013-09-03 10:43:32 -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
jrburke
34c4e122a3 Remove the define.amd.jQuery check, ref gh-1150. 2013-02-28 17:21:18 -05:00
Timo Tijhof
5dd8a90f73 Make compatible with jshint, lint test/data. Close gh-1043. 2012-12-06 13:46:37 -05:00
jaubourg
b7ece8c620 Revert "Organizes the php scripts used for testing better, so that the whole logic of a unit, server-side and client-side, is contained within the unit itself. Nearly all ajax unit tests take advantage of the new 'framework'. Lots of files got deleted because they became redundant or weren't used anymore."
This reverts commit 228ab3ddae.
2012-12-05 14:54:14 +01:00
jaubourg
7f7007dffe Revert "228ab3d followup 1: fix test failures. Close gh-1056."
This reverts commit 20608b3579.
2012-12-05 14:54:00 +01:00
Richard Gibson
20608b3579 228ab3d followup 1: fix test failures. Close gh-1056. 2012-12-05 02:12:32 -05:00
jaubourg
228ab3ddae Organizes the php scripts used for testing better, so that the whole logic of a unit, server-side and client-side, is contained within the unit itself. Nearly all ajax unit tests take advantage of the new 'framework'. Lots of files got deleted because they became redundant or weren't used anymore. 2012-12-04 07:40:12 +01: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
603e70b90e Greatly simplifies ajaxTest 2012-11-26 11:49:20 +01:00
jaubourg
d31cef38f2 Total revamping of the ajax unit tests 2012-11-26 03:31:19 +01:00
Richard Gibson
53cb49cb0a Remove gratuitous punctuation 2012-11-01 22:22:39 -04:00
Richard Gibson
3f51504580 No ticket: remove test suite external dependencies 2012-11-01 17:32:08 -04: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