1 var Q = require('../kew')
3 exports.testSpreadStatic = function (test) {
4 Q.spread([Q.resolve('a'), 'b'], function (a, b) {
11 exports.testSpreadMethod = function (test) {
16 .spread(function (a, b) {
23 exports.testSpreadBoundMethod = function (test) {
26 return [Q.resolve('a'), 'b']
28 .spreadBound(function (c, a, b) {
29 test.equal('scope', this.scope)
34 }, {scope: 'scope'}, 'c')
37 exports.testAllSynchronization1 = function (test) {
41 var promiseA = Q.fcall(function () {
44 var promiseB = Q.fcall(function () {
48 test.deepEqual([], order)
50 var promiseAB = Q.all([promiseA, promiseB])
51 test.deepEqual([], order)
53 return [promiseA, promiseB]
55 .then(function (results) {
56 test.deepEqual(['a', 'b'], order)