Skip to content
This repository has been archived by the owner on Mar 26, 2024. It is now read-only.

Commit

Permalink
support thenable versions of SuperTest
Browse files Browse the repository at this point in the history
Since v1.1.0, SuperTest ships a version of SuperAgent with "thenable"
support; that is, a then method which provides minimal interop with
Promise libraries but does not provide full then semantics.

See ladjs/superagent#722 and ladjs/superagent#726 for
context. Since SuperTest's maintainer is entirely unwilling to support
promises, we'll continue to maintain this library for those who want
`.then()` to return a real promise.
  • Loading branch information
benesch committed Sep 6, 2015
1 parent 8e0ca10 commit 9f6cc1d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/index.js
Expand Up @@ -72,16 +72,16 @@ describe("supertest", function () {
describe("Test instances", function () {
var request = supertest(server);

it("should not be a promise", function () {
request.get("/home").should.not.have.property("then");
it("should not have toPromise", function () {
request.get("/home").should.not.have.property("toPromise");
});
});

describe("TestAgent instances", function () {
var agent = supertest.agent(server);

it("should not be a promise", function () {
agent.get("/home").should.not.have.property("then");
it("should not have toPromise", function () {
agent.get("/home").should.not.have.property("toPromise");
});
});
});

0 comments on commit 9f6cc1d

Please sign in to comment.