Skip to content

Commit

Permalink
Switch tests from call to fcall
Browse files Browse the repository at this point in the history
"call" is deprecated on account of exposing the unnecessary JavaScript
detail of a thisp to the promise interface.
  • Loading branch information
kriskowal committed May 15, 2012
1 parent faaa310 commit 129e1f3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions q-spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ describe("promises for objects", function () {

it("propagates a rejection", function () {
var exception = new Error("boo!");
return Q.call(function () {
return Q.fcall(function () {
throw exception;
})
.get("a")
Expand Down Expand Up @@ -131,7 +131,7 @@ describe("promises for objects", function () {

it("fulfills a promise", function () {
var object = {a: 10};
return Q.call(function () {
return Q.fcall(function () {
return object;
})
.del('a')
Expand All @@ -145,7 +145,7 @@ describe("promises for objects", function () {

it("propagates a rejection", function () {
var exception = new Error("hah-hah");
return Q.call(function () {
return Q.fcall(function () {
throw exception;
})
.del('a')
Expand Down Expand Up @@ -546,7 +546,7 @@ describe("allResolved", function () {
var resolved;
var rejected;

Q.call(function () {
Q.fcall(function () {
toReject.reject();
rejected = true;
})
Expand Down

0 comments on commit 129e1f3

Please sign in to comment.