aboutsummaryrefslogtreecommitdiffstats
path: root/build/tasks/promises_aplus_tests.js
diff options
context:
space:
mode:
authorRichard Gibson <richard.gibson@gmail.com>2016-04-14 23:59:30 -0400
committerRichard Gibson <richard.gibson@gmail.com>2016-05-02 12:30:31 -0400
commit356a3bccb0e7468a2c8ce7d8c9c6cd0c5d436b8b (patch)
treeb0d1a8401252ac37b7254d4157c2e350a6cbc24b /build/tasks/promises_aplus_tests.js
parent0bd98b1b13872255225358f328bee1f980755483 (diff)
downloadjquery-356a3bccb0e7468a2c8ce7d8c9c6cd0c5d436b8b.tar.gz
jquery-356a3bccb0e7468a2c8ce7d8c9c6cd0c5d436b8b.zip
Deferred: Separate the two paths in jQuery.when
Single- and no-argument calls act like Promise.resolve. Multi-argument calls act like Promise.all. Fixes gh-3029 Closes gh-3059
Diffstat (limited to 'build/tasks/promises_aplus_tests.js')
-rw-r--r--build/tasks/promises_aplus_tests.js14
1 files changed, 12 insertions, 2 deletions
diff --git a/build/tasks/promises_aplus_tests.js b/build/tasks/promises_aplus_tests.js
index 3e770a079..c4fb86d4c 100644
--- a/build/tasks/promises_aplus_tests.js
+++ b/build/tasks/promises_aplus_tests.js
@@ -4,10 +4,20 @@ module.exports = function( grunt ) {
var spawnTest = require( "./lib/spawn_test.js" );
- grunt.registerTask( "promises_aplus_tests", function() {
+ grunt.registerTask( "promises_aplus_tests",
+ [ "promises_aplus_tests_deferred", "promises_aplus_tests_when" ] );
+
+ grunt.registerTask( "promises_aplus_tests_deferred", function() {
+ spawnTest( this.async(),
+ "./node_modules/.bin/promises-aplus-tests",
+ "test/promises_aplus_adapter_deferred.js"
+ );
+ } );
+
+ grunt.registerTask( "promises_aplus_tests_when", function() {
spawnTest( this.async(),
"./node_modules/.bin/promises-aplus-tests",
- "test/promises_aplus_adapter.js"
+ "test/promises_aplus_adapter_when.js"
);
} );
};