Home | History | Annotate | Download | only in js

Lines Matching refs:Promise

26 description('Test Promise construction.');
31 var promise = new Promise(function(newResolve, newReject) {
37 shouldBeTrue('promise instanceof Promise');
38 shouldBe('promise.constructor', 'Promise');
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) {