A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/chaijs/chai-http/commit/0cbcd3a7873d2bc88792d73345ca1697d119fae1 below:

Merge pull request #223 from austince/release/4.2.0 · chaijs/chai-http@0cbcd3a · GitHub

File tree Expand file treeCollapse file tree 7 files changed

+190

-201

lines changed

Filter options

Expand file treeCollapse file tree 7 files changed

+190

-201

lines changed Original file line number Diff line number Diff line change

@@ -0,0 +1,61 @@

1 +

// Definitions by: Wim Looman <https://github.com/Nemo157>

2 +

// Liam Jones <https://github.com/G1itcher>

3 +

// Federico Caselli <https://github.com/CaselIT>

4 +

// Bas Luksenburg <https://github.com/bas-l>

5 +

// Austin Cawley-Edwards <https://github.com/austince>

6 +

// TypeScript Version: 3.0

7 +

/// <reference types="chai" />

8 +

import * as request from 'superagent';

9 + 10 +

// Merge namespace with global chai

11 +

declare global {

12 +

namespace Chai {

13 +

interface ChaiStatic {

14 +

request: ChaiHttpRequest;

15 +

}

16 + 17 +

interface ChaiHttpRequest {

18 +

(server: any): ChaiHttp.Agent;

19 + 20 +

agent(server: any): ChaiHttp.Agent;

21 + 22 +

addPromises(promiseConstructor: PromiseConstructorLike): void;

23 +

}

24 + 25 +

interface Assertion {

26 +

redirectTo(location: string): Assertion;

27 + 28 +

param(key: string, value?: string): Assertion;

29 + 30 +

cookie(key: string, value?: string): Assertion;

31 + 32 +

status(code: number): Assertion;

33 + 34 +

statusCode(code: number): Assertion;

35 + 36 +

header(key: string, value?: string | RegExp): Assertion;

37 + 38 +

headers: Assertion;

39 +

json: Assertion;

40 +

text: Assertion;

41 +

html: Assertion;

42 +

redirect: Assertion;

43 +

}

44 + 45 +

interface TypeComparison {

46 +

ip: Assertion;

47 +

}

48 +

}

49 + 50 +

namespace ChaiHttp {

51 +

interface Response extends request.Response {}

52 +

interface Agent extends request.SuperAgentStatic {

53 +

keepOpen(): Agent;

54 +

close(callback?: (err: any) => void): Agent;

55 +

}

56 +

}

57 +

}

58 + 59 +

declare function chaiHttp(chai: any, utils: any): void;

60 + 61 +

export = chaiHttp;

You can’t perform that action at this time.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4