Lines Matching refs:function
31 var promise = new Promise(function(newResolve, newReject) {
40 shouldBeTrue('resolve instanceof Function');
41 shouldBeTrue('reject instanceof Function');
43 shouldThrow('new Promise()', '"TypeError: Promise resolver undefined is not a function"');
44 shouldThrow('new Promise(37)', '"TypeError: Promise resolver 37 is not a function"');
47 promise = new Promise(function() { throw Error('foo'); });
48 testPassed('promise = new Promise(function() { throw Error("foo"); }) did not throw exception.');
50 testFailed('new Promise(function() { throw Error(\'foo\'); }) should not throw an exception.');
53 promise.then(undefined, function(localResult) {
58 new Promise(function(resolve) {
61 }).then(function(localResult) {
66 }, function(localResult) {