forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
chai-as-promised.d.ts
36 lines (30 loc) · 1.14 KB
/
chai-as-promised.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
// Type definitions for chai-as-promised
// Project: https://github.com/domenic/chai-as-promised/
// Definitions by: jt000 <https://github.com/jt000>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../chai/chai.d.ts" />
declare module 'chai-as-promised' {
function chaiAsPromised(chai: any, utils: any): void;
export = chaiAsPromised;
}
declare module Chai {
interface Assertion {
become(expected: any): Assertion;
fulfilled: Assertion;
rejected: Assertion;
rejectedWith(expected: any): Assertion;
notify(fn: Function): Assertion;
}
interface LanguageChains {
eventually: Assertion;
}
interface Assert {
eventually: Assert;
isFulfilled(promise: any, message?: string): void;
becomes(promise: any, expected: any, message?: string): void;
doesNotBecome(promise: any, expected: any, message?: string): void;
isRejected(promise: any, message?: string): void;
isRejected(promise: any, expected: any, message?: string): void;
isRejected(promise: any, match: RegExp, message?: string): void;
}
}