Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- describe("all", function () {
- it("works", function (done) {
- var count = 0;
- var p = new Promise;
- var p2 = p.all(function () {
- return [
- (function () {
- var p = new Promise();
- count++;
- p.resolve();
- return p;
- })()
- , (function () {
- var p = new Promise();
- count++;
- p.resolve();
- return p;
- })()
- ];
- });
- p2.then(function () {
- assert.equal(count, 2);
- done();
- });
- p.resolve();
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement