-
-
Notifications
You must be signed in to change notification settings - Fork 305
/
results.d.ts
52 lines (43 loc) · 1.19 KB
/
results.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
import through from '@ljharb/through';
import type { EventEmitter } from 'events';
import type { StreamOptions } from '../';
import Test = require('./test');
declare class Results extends EventEmitter {
constructor(options?: { todoIsOK?: boolean });
count: number;
fail: number;
pass: number;
tests: Test[];
todo: number;
todoIsOK: boolean;
closed?: boolean;
_isRunning: boolean;
_only: Test | null;
_stream: through.ThroughStream;
close(this: Results): void;
createStream(this: Results, opts?: StreamOptions): through.ThroughStream;
only(this: Results, t: Test): void;
push(this: Results, t: Test): void;
_watch(this: Results, t: Test): void;
}
declare namespace Results {
export type Operator = string;
export type Result = {
id: number;
ok: boolean;
skip: unknown;
todo: unknown;
name?: string;
operator: undefined | Operator;
objectPrintDepth?: number;
actual?: unknown;
expected?: unknown;
error?: unknown;
functionName?: string;
file?: string;
line?: number;
column?: number;
at?: string;
};
}
export = Results;