1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 | import * as empower from "empower";
|
12 |
|
13 | export = assert;
|
14 | export as namespace assert;
|
15 |
|
16 | declare function assert(value: any, message?: string): void;
|
17 | declare namespace assert {
|
18 | export class AssertionError implements Error {
|
19 | name: string;
|
20 | message: string;
|
21 | actual: any;
|
22 | expected: any;
|
23 | operator: string;
|
24 | generatedMessage: boolean;
|
25 |
|
26 | constructor(options?: { message?: string; actual?: any; expected?: any; operator?: string; stackStartFunction?: Function });
|
27 | }
|
28 |
|
29 | export function fail(actual?: any, expected?: any, message?: string, operator?: string): never;
|
30 | export function ok(value: any, message?: string): void;
|
31 | export function equal(actual: any, expected: any, message?: string): void;
|
32 | export function notEqual(actual: any, expected: any, message?: string): void;
|
33 | export function deepEqual(actual: any, expected: any, message?: string): void;
|
34 | export function notDeepEqual(acutal: any, expected: any, message?: string): void;
|
35 | export function strictEqual(actual: any, expected: any, message?: string): void;
|
36 | export function notStrictEqual(actual: any, expected: any, message?: string): void;
|
37 | export function deepStrictEqual(actual: any, expected: any, message?: string): void;
|
38 | export function notDeepStrictEqual(actual: any, expected: any, message?: string): void;
|
39 | export var throws: {
|
40 | (block: Function, message?: string): void;
|
41 | (block: Function, error: Function, message?: string): void;
|
42 | (block: Function, error: RegExp, message?: string): void;
|
43 | (block: Function, error: (err: any) => boolean, message?: string): void;
|
44 | };
|
45 | export var doesNotThrow: {
|
46 | (block: Function, message?: string): void;
|
47 | (block: Function, error: Function, message?: string): void;
|
48 | (block: Function, error: RegExp, message?: string): void;
|
49 | (block: Function, error: (err: any) => boolean, message?: string): void;
|
50 | };
|
51 | export function ifError(value: any): void;
|
52 |
|
53 | export const strict: typeof assert;
|
54 |
|
55 | export interface Options {
|
56 | assertion?: empower.Options;
|
57 | output?: powerAssertFormatter.Options;
|
58 | }
|
59 |
|
60 | export function customize(options: Options): typeof assert;
|
61 | }
|