mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-11 11:50:54 +08:00
Update SuperTest to version 1.1.0
- Callback now always takes 2 arguments, see https://github.com/visionmedia/superagent/commit/e440274 - Override superagent.Request.end() so it takes the proper callback signature
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
/// <reference path="supertest.d.ts" />
|
||||
/// <reference path="../express/express.d.ts" />
|
||||
|
||||
import supertest = require('supertest')
|
||||
import express = require('express');
|
||||
import * as supertest from 'supertest';
|
||||
import * as express from 'express';
|
||||
|
||||
var app = express();
|
||||
|
||||
@@ -11,7 +11,7 @@ supertest(app)
|
||||
.expect('Content-Type', /json/)
|
||||
.expect('Content-Length', '20')
|
||||
.expect(201)
|
||||
.end((err: any, res: supertest.Response) => {
|
||||
.end((err, res) => {
|
||||
if (err) throw err;
|
||||
});
|
||||
|
||||
@@ -56,4 +56,3 @@ function hasPreviousAndNextKeys(res: supertest.Response) {
|
||||
if (!('next' in res.body)) return "missing next key";
|
||||
if (!('prev' in res.body)) throw new Error("missing prev key");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user