Commit Graph

32 Commits

Author SHA1 Message Date
Oleg Gaidarenko
14eba98c8f Build: code style fixes after all those reverts 2015-12-22 18:51:04 +03:00
Oleg Gaidarenko
5826cafb95 Revert "Deferred: Backwards-compatible standards interoperability"
This reverts commit 34f2563179.
2015-12-22 17:07:04 +03:00
Oleg Gaidarenko
0aa24f9c75 Revert "Deferred: add .catch handler"
This reverts commit ef77f83db8.
2015-12-22 15:04:48 +03:00
Oleg Gaidarenko
2f0cedc997 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
Ref c8d15a2f9f
2015-09-08 04:15:54 +03:00
Oleg Gaidarenko
4543815eed 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

Ref b930d14ce6
Fixes gh-2540
2015-09-07 20:14:59 +03:00
Oleg Gaidarenko
20ddbe4f59 Build: Update jscs and lint files
Ref 10fdad742a
Fixes gh-2056
2015-09-07 20:14:50 +03:00
Timmy Willison
203979d153 Deferred: pass lint in new catch tests 2015-07-06 17:10:26 -04:00
Timmy Willison
ef77f83db8 Deferred: add .catch handler
Fixes gh-2102
2015-07-06 17:08:42 -04:00
Richard Gibson
35295f1c20 Deferred: Always handle progress callbacks before done/fail
Fixes gh-2013
Fixes gh-2010
Closes gh-2210

(cherry picked from commit 002240a6eb)
2015-04-22 15:25:35 -04:00
Richard Gibson
34f2563179 Deferred: Backwards-compatible standards interoperability
Fixes gh-1722
Closes gh-1996

(cherry picked from commit 555a50d340)
2015-03-20 02:14:04 -04:00
Nicolas HENRY
efb98f85ba Deferred: Fix $.when with resolved deferred and progress callbacks
Ref ab20d9d24f
2014-12-25 15:48:57 +03:00
Daniel Herman
bc2b13915c No ticket: add assertions for jQuery.when( array ). Close gh-1312. (cherry-picked from 584a4af9c8) 2013-08-19 18:26:57 +02:00
Timmy Willison
d2435ead36 Update jshintrc to conform to new style guide. Conform to onevar and unused 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
2013-04-09 12:21:54 -04:00
nanto
0c5d2fbabb Propagate context of returned deferred object in Deferred.then(). Fixes #13160. 2013-01-08 17:59:08 +00:00
jaubourg
23d7cf0488 Deferred: .resolve(), .reject() and .notify() now set the callback context to the promise instance rather than the deferred instance ; .then() has also been amended. Fixes #11405. 2012-12-07 15:14:12 +01:00
Erick Ruiz de Chavez
efc2d8b1a6 Fixing style for deferred.js unit tests. Close gh-973.
Close jquery/2012-dev-summit/#56
2012-10-16 08:24:18 -04:00
jaubourg
74cdd78497 deferred.promise(obj) should work with non-objects. Fixes #12521. Much needed unit tests added! 2012-09-13 15:44:12 +02:00
Chad Killingsworth
de9bed319e Make unit tests friendly to Closure Compiler. Closes gh-845.
Conflicts:
    	test/unit/effects.js
    	test/unit/offset.js
2012-07-05 15:52:42 -04:00
Rick Waldron
7ff3da186c Unit tests are linted and passing. 2012-06-21 15:30:24 -04:00
jaubourg
f93a2f569d Preserves context objects when multiple Deferreds are passed to $.when(). Context is an array containing the original contexts in order. When non-observable value is given, associated context is undefined. In case only a single non-observable value is given, context is the global object (thanks so much Function.prototype.apply!). Fixes #11749. 2012-05-12 21:41:39 +02:00
Dave Methvin
c5fda2945c Fix #11736. Remove deprecated Deferred.isResolved/isRejected. 2012-05-11 15:02:18 -04:00
jaubourg
a41f240674 Makes Deferred implementation truly Promise/A compliant. Unit tests amended. Actually few changes required in jQuery's own source and we gained 8 bytes minified gzipped \o/. 2012-04-02 01:29:39 +02:00
jaubourg
2a9f0681de Have Deferred.always return the object onto which it is currently attached to enable true chainability. Fixes #10723. Unit tests added. 2011-11-09 01:02:29 +01:00
Mike Sherov
f35ba5e699 Fix #10691. Remove all instances of equals() and same(), as these are deprecated in QUnit. 2011-11-06 15:27:42 -05:00
jaubourg
d29182e8d0 Removes isPending and introduces state as a means to retrieve the Deferred/Promise state. Unit tests amended. 2011-10-11 20:23:56 -04:00
jaubourg
749d32a290 isProgressing becomes isPending. Unit tests added. 2011-10-04 12:08:46 -04:00
jaubourg
4092e3d275 $.Callbacks, $.Topic and notify/progress on $.Deferred. 2011-09-19 15:42:30 -04:00
jaubourg
139135a98a Fixes #9446. Context is properly propagated using pipe. If context was the original deferred, then context is updated to next deferred in the chain. Unit tests added. 2011-07-01 01:51:50 +02:00
jaubourg
8c13cfa805 Fixes #9104. Returning null or undefined in a pipe callback shouldn't end up throwing an exception. Silly, silly, me. 2011-05-09 10:01:20 +02:00
jaubourg
7a1c6beab0 Renames chain as pipe. 2011-04-08 17:35:08 +02:00
jaubourg
bb99899ca0 Adds always and chain methods to deferreds. 2011-04-07 05:49:32 +02:00
jaubourg
2d0bc7ce72 Moves Deferred-related code into a separate module. Context handling has been simplified in _Deferred.resolve and jQuery.when has been refactored for clarity (and minor optimization). 2011-03-03 19:38:06 +01:00