aboutsummaryrefslogtreecommitdiffstats
path: root/test/unit/data.js
Commit message (Collapse)AuthorAgeFilesLines
* Build: code style fixes after all those revertsOleg Gaidarenko2015-12-221-25/+27
|
* Revert "Data: do not include digits when camelCasing"Oleg Gaidarenko2015-12-221-35/+14
| | | | This reverts commit a254f22d7bb5b072a82087a448130ffadd70d698.
* Revert "Data: always camelCase keys in .data()"Oleg Gaidarenko2015-12-221-176/+50
| | | | This reverts commit 0204c3089e7beee0306594605cc64d1e050ecd07.
* Revert "Data: camelCasing should not ignore case"Oleg Gaidarenko2015-12-221-19/+0
| | | | This reverts commit cf16f860b05b7bffeb2382a0a55bb85c69b2abb5.
* Tests: Provide equal() arguments in correct order (actual, expected)Richard Gibson2015-09-081-1/+1
| | | | | | | | | | Ref 224271982eb9cd351d7db1b38c740b4e927e6f97 Ref f5bf9bc48897e3b8f050d87d02252c8be456044a (cherry picked from commit d3d8d9751f3d14a545b26cf820dc1f51896a7b50) Conflicts: test/unit/data.js
* Tests: more style correctionsOleg Gaidarenko2015-09-081-4/+5
| | | | | | Provocated by jscs-dev/node-jscs@2de68c0 Ref c161eecce09fc66ce252d4adf64b565f726bb6d2
* Tests: further improvements QUnit 2.0 migrationOleg Gaidarenko2015-09-081-2/+2
| | | | | | | | | * Remove QUnit jshint globals * Extend QUnit.assert methods * Use assert.async instead of start/stop/done Ref b930d14ce64937e9478405eee2828d4da091d2cb Ref c8d15a2f9f108e90d3651c31e4abf45415a30fde
* Tests: do not create data cache when fetching single propertyJason Bedard2015-09-081-0/+16
| | | | | (test cherry-picked from f5bf9bc48897e3b8f050d87d02252c8be456044a) Refs gh-2554
* Data: Don't expose jQuery.acceptDataJason Bedard2015-09-081-35/+19
| | | | | | | | jQuery.acceptData is an undocumented internal API that shouldn't be exposed. (cherry-picked from 224271982eb9cd351d7db1b38c740b4e927e6f97) Fixes gh-2555
* Tests: Partially use new qunit interfaceOleg Gaidarenko2015-09-071-344/+694
| | | | | | | | | | | | | 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 Ref b930d14ce64937e9478405eee2828d4da091d2cb Fixes gh-2540
* Build: Update jscs and lint filesOleg Gaidarenko2015-09-071-315/+321
| | | | | Ref 10fdad742a2a6aa9f0e00b3e04fc5264797c53c7 Fixes gh-2056
* Tests: don't use deprecated argument in test declarationOleg Gaidarenko2015-07-301-6/+18
| | | | Ref aabe94edb4880c75eeebc5b5b5d66a9ad17008fe
* Data: camelCasing should not ignore caseTimmy Willison2015-05-041-0/+10
| | | | Fixes gh-2070
* Data: always camelCase keys in .data()Timmy Willison2015-05-041-6/+90
| | | | | | | - This effectively implements our "Embrace HTML5" option - Related: http://goo.gl/GcQAtn Fixes gh-2257
* Data: do not include digits when camelCasingTimmy Willison2015-05-041-4/+5
| | | | Fixes gh-1751
* Core: Update tested jsdom, drop obsolete workaroundsMichał Gołębiowski2015-03-251-2/+1
| | | | | | | | | | | The latest version supporting Node.js is 3.1.2; some workarounds are not needed for this version. For example, in jsdom 3.1.2 a document created via document.implementation.createHTMLDocument( "" ) has a body. (partially cherry-picked from 95c0a10e15477a5031185e2d656d896905562afa) Fixes gh-2153 Closes gh-2154
* Data: Use a PDF object instead of a Java applet for acceptData testingMichał Gołębiowski2015-01-291-4/+4
| | | | | | | | | This should fix "Java out of date" errors on BrowserStack. (cherry-picked from 087d280ad1160de53a45ea96184911194f7b46e0) Fixes gh-1938 Closes gh-2028
* Data: use removeAttribute in cleanData to bypass Chrome bugJason Bedard2014-12-101-10/+2
| | | | | | | Related: https://code.google.com/p/chromium/issues/detail?id=378607 Fixes gh-1664
* Tests: Minor updates for QUnit 1.16 compatibilityRichard Gibson2014-12-051-3/+3
| | | | More to come later.
* Build: Fix various typosOleg Gaidarenko2014-11-081-1/+1
| | | | | Thanks @jamesgpearce, @imyousuf Ref dc4b914a05e1e6dbf13f916897b5d6a472ea0380
* Data: Work around IE11 bug with onpageshow attributeDave Methvin2014-04-301-0/+6
| | | | | | | | | Fixes #14894 (cherry picked from commit b8133e282ceebf502c7c08d849b176a929c9c450) Conflicts: src/data.js test/unit/data.js
* Ref c66a5e70: Synchronize unit tests with masterRichard Gibson2013-11-071-1/+2
|
* Fix #14074: element id="nodeName". Close gh-1389.Richard Gibson2013-11-071-9/+13
|
* Fix #14101: $().data() should be undefined, not nullCorey Frang2013-11-061-0/+6
| | | | - Backported 30eee925dbc9f8d465ccf064f48c24061ffdc378 for 1.x
* Fix #14459: Use jQuery.parseJSON instead of JSON.parseRichard Gibson2013-10-281-12/+2
| | | | (cherry picked from commit ced9d155f010bc456745a55a63ca959db9d405d3)
* Ref 2263134b: Better identify potential JSON. Close gh-1401.Ronny Springer2013-10-161-12/+45
| | | | | | | | (cherry picked from commit 083edd60a6c189f17ff1087431e849dd11c111b2) Conflicts: src/data.js
* AMD-ify jQuery sourcegit s! Woo! Fixes #14113, #14163.Timmy Willison2013-08-151-8/+8
| | | | | | | | | | | | | | | | | | | | Conflicts: Gruntfile.js README.md src/ajax.js src/ajax/xhr.js src/attributes.js src/core.js src/css.js src/data.js src/effects.js src/event.js src/manipulation.js src/offset.js src/selector-native.js src/traversing.js test/unit/core.js test/unit/data.js
* Update jshintrc to conform to new style guide. Conform to onevar and unused ↵Timmy Willison2013-04-091-25/+34
| | | | | | | | | | | | | | | | in tests. Fixes #13755. Conflicts: src/.jshintrc src/data.js test/unit/attributes.js test/unit/core.js test/unit/data.js test/unit/event.js test/unit/manipulation.js test/unit/queue.js test/unit/traversing.js test/unit/wrap.js
* Ref #13554: Move redundant methods to event-alias.js. Close gh-1225.Michał Gołębiowski2013-04-071-2/+2
| | | | (cherry picked from commits 8ca9f931ec311b6f73990eac7665451a28bceac3 84a94acae1ed7d65d91df235985e433d34486dc3 100d3c351604e1f9641098da2e78678b4e6d9cdf)
* Fix #8335: Avoid memory leak by never setting data on non-element ↵danilsomsikov2013-01-161-1/+12
| | | | | | non-document nodes. Ref gh-1127. (cherry picked from commit cc324abf739669bd2a4669742c994b86c4ad467b)
* Restore jQuery.access parameter mistakenly removed in 80d45a69Richard Gibson2012-11-061-25/+38
|
* Fix #10544. Remove deprecated .data() event namespaced triggering.Dave Methvin2012-10-311-58/+1
| | | | Data events were horribly slow, never documented, and caused strange interpretation of data items with dots in them.
* Implement expectation test instead of using _removeData. Close gh-997.Timo Tijhof2012-10-281-75/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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)
* Simplify tests for #12786, reduce to only those required to support the fixRick Waldron2012-10-251-57/+22
|
* Less deep and more strict.Rick Waldron2012-10-251-2/+2
|
* Remove .hyphen property from tests (left behind in refactoring)Rick Waldron2012-10-241-6/+3
|
* Brute force property removal when removeData([a,b,c]). Fixes #12786Rick Waldron2012-10-241-0/+70
| | | | Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
* Create private methods for processing data/removeData requests. Fixes ↵carldanley2012-10-161-9/+9
| | | | #12519, Closes gh-976
* enforce double quotes via JSHint. Closes gh-975Mike Sherov2012-10-161-3/+9
|
* Fix #10863. Allow newlines in JSON data- attributes.Dave Methvin2012-08-231-1/+8
|
* Fix #7579. Don't convert to number if it changes the string. Close gh-852.Dave Methvin2012-07-251-3/+7
| | | | Net effect here is that hex numbers and most exponential-format numbers or long sequences of digits will remain strings rather than being coerced to numbers. `The people have spoken.
* Make unit tests friendly to Closure Compiler. Closes gh-845.Chad Killingsworth2012-07-051-15/+15
| | | | | | Conflicts: test/unit/effects.js test/unit/offset.js
* Unit tests are linted and passing.Rick Waldron2012-06-211-12/+19
|
* Fix #11435. Remove obsolete test code.Andy Monat2012-04-041-6/+0
|
* Fix #11309. Recognize hexadecimal in data attributes.Sindre Sorhus2012-02-091-1/+3
|
* Fix #5571. Setters should treat `undefined` as a no-op and be chainable.Richard Gibson2011-12-061-2/+1
|
* Fix #10691. Remove all instances of equals() and same(), as these are ↵Mike Sherov2011-11-061-78/+78
| | | | deprecated in QUnit.
* Landing pull request 512. 1.7 - removeData now takes space separated lists ↵Corey Frang2011-09-191-1/+23
| | | | | | | | and arrays of keys - Fixes #7323. More Details: - https://github.com/jquery/jquery/pull/512 - http://bugs.jquery.com/ticket/7323
* Landing pull request 503. 1.7 data: set a flag in the private data cache to ↵Corey Frang2011-09-191-0/+21
| | | | | | | | avoid having to scan attributes multiple times - Fixes #8909. More Details: - https://github.com/jquery/jquery/pull/503 - http://bugs.jquery.com/ticket/8909
* Landing pull request 500. 1.7 - "public data" stored as a key on "internal ↵Corey Frang2011-09-191-7/+8
| | | | | | | | data" - Fixes #8921. More Details: - https://github.com/jquery/jquery/pull/500 - http://bugs.jquery.com/ticket/8921