Renamed q test file.

This commit is contained in:
Andrew Gaspar committed 2013-03-23 19:08:45 -05:00
1 parent 105af2df70
commit c0fb4cc5c3
1 file changed
+27
View File
@@ -0,0 +1,27 @@
/// <reference path="q.module.d.ts" />
/// <reference path="../jasmine/jasmine.d.ts" />
import q = module("q");
describe("q", function () {
it("should return", function (done) {
q({ myValue: true }).then(function (obj) {
if (obj.myValue) done();
else done("didn't work =(");
},
(err) => done(err));
});
it("should process all", function (done: (err?) => void) {
q.all([q(1), q(2), q(3)]).then(function (arr: number[]) {
var sum = arr.reduce(function (memo, cur) {
return memo + cur;
}, 0);
if (sum === 6) done();
else done({ actual: sum });
},
(err) => done(err));
});
});