From 356a3bccb0e7468a2c8ce7d8c9c6cd0c5d436b8b Mon Sep 17 00:00:00 2001 From: Richard Gibson Date: Thu, 14 Apr 2016 23:59:30 -0400 Subject: 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 --- build/tasks/promises_aplus_tests.js | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'build/tasks/promises_aplus_tests.js') 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" ); } ); }; -- cgit v1.2.3