/**
* The contents of this file are subject to the terms of the Common Development and
* Distribution License (the License). You may not use this file except in compliance with the
* License.
*
* You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the
* specific language governing permission and limitations under the License.
*
* When distributing Covered Software, include this CDDL Header Notice in each file and include
* the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
* Header, with the fields enclosed by brackets [] replaced by your own identifying
* information: "Portions copyright [year] [name of copyright owner]".
*
* Copyright 2015 ForgeRock AS.
*/
define([
"jquery",
"underscore",
"sinon",
describe("#all", function () {
function whenPassed (value) {
return function () {
}, function (value) {
done();
});
});
};
}
context("when passed an array", function () {
context("which is empty", function () {
it("resolves with empty array", function () {
});
});
});
context("of 1 promise", function () {
var d, p, resolvedSpy, rejectedSpy;
beforeEach(function () {
d = $.Deferred();
});
it("returns a pending promise while the passed in promise is pending", function () {
});
it("resolves the returned promise when the passed in promise is resolved", function () {
d.resolve();
});
it("rejects the returned promise when the passed in promise is rejected", function () {
d.reject();
});
it("resolves the promise with an array containing the value of the resolved promise", function () {
d.resolve(1);
});
it("groups multiple resolved values into an array", function () {
});
it("rejects the returned promise if the passed in promise is rejected", function () {
d.reject();
});
});
context("of 2 promises", function () {
beforeEach(function () {
});
it("doesn't resolve the returned promise if neither of the promises are resolved", function () {
});
it("doesn't resolve the returned promise if only the first promise is resolved", function () {
});
it("doesn't resolve the returned promise if only the second promise is resolved", function () {
});
it("resolves the returned promise when both of the promises are resolved", function () {
});
it("resolves the promise with an array containing the value of the resolved promise", function () {
});
it("groups multiple resolved values into an array", function () {
});
it("rejects the returned promise if the first promise is rejected", function () {
});
it("rejects the returned promise if the second promise is rejected", function () {
});
});
});
});
});
});