UNPKG

3.59 kBTypeScriptView Raw
1import * as oclifTest from '@oclif/test';
2import { command, Config, expect, FancyTypes } from '@oclif/test';
3import { Config as OclifConfig } from '@oclif/core';
4import { AuthFields } from '@salesforce/core';
5import { TestContext } from '@salesforce/core/lib/testSetup';
6import { AnyJson, Dictionary, JsonMap } from '@salesforce/ts-types';
7import { loadConfig } from '@oclif/test/lib/load-config';
8declare const $$: TestContext;
9declare const test: oclifTest.FancyTypes.Base<oclifTest.FancyTypes.Context, {
10 skip: {
11 output: unknown;
12 args: [];
13 };
14} & {
15 only: {
16 output: unknown;
17 args: [];
18 };
19} & {
20 retries: {
21 output: unknown;
22 args: [count: number];
23 };
24} & {
25 catch: {
26 output: {
27 error: Error;
28 };
29 args: [arg: string | RegExp | ((err: Error) => any), opts?: {
30 raiseIfNotThrown?: boolean | undefined;
31 } | undefined];
32 };
33} & {
34 env: {
35 output: unknown;
36 args: [env: {
37 [k: string]: string | null | undefined;
38 }, opts?: oclifTest.FancyTypes.EnvOptions | undefined];
39 };
40} & {
41 stub: {
42 output: {
43 stubs: any[];
44 };
45 args: [object: any, path: any, value: () => any];
46 };
47} & {
48 stdin: {
49 output: unknown;
50 args: [input: string, delay?: number | undefined];
51 };
52} & {
53 stderr: {
54 output: {
55 readonly stderr: string;
56 };
57 args: [opts?: {
58 print?: boolean | undefined;
59 stripColor?: boolean | undefined;
60 } | undefined];
61 };
62} & {
63 stdout: {
64 output: {
65 readonly stdout: string;
66 };
67 args: [opts?: {
68 print?: boolean | undefined;
69 stripColor?: boolean | undefined;
70 } | undefined];
71 };
72} & {
73 nock: {
74 output: {
75 nock: number;
76 };
77 args: [host: string, options: oclifTest.FancyTypes.NockOptions | oclifTest.FancyTypes.NockCallback, cb?: oclifTest.FancyTypes.NockCallback | undefined];
78 };
79} & {
80 timeout: {
81 output: {
82 timeout: number;
83 };
84 args: [timeout?: number | undefined];
85 };
86} & {
87 loadConfig: {
88 output: {
89 config: import("@oclif/core/lib/interfaces").Config;
90 };
91 args: [opts?: loadConfig.Options | undefined];
92 };
93} & {
94 command: {
95 output: {
96 config: import("@oclif/core/lib/interfaces").Config;
97 expectation: string;
98 };
99 args: [args: string | string[], opts?: loadConfig.Options | undefined];
100 };
101} & {
102 exit: {
103 output: {
104 error: any;
105 };
106 args: [code?: number | undefined];
107 };
108} & {
109 hook: {
110 output: {
111 config: import("@oclif/core/lib/interfaces").Config;
112 expectation: string;
113 };
114 args: [event: string, hookOpts?: Record<string, unknown> | undefined, options?: loadConfig.Options | undefined];
115 };
116} & {
117 withOrg: {
118 output: Dictionary<unknown>;
119 args: [org?: Partial<AuthFields> | undefined, setAsDefault?: boolean | undefined];
120 };
121} & {
122 withConnectionRequest: {
123 output: Dictionary<unknown>;
124 args: [fakeFunction: (request: AnyJson, options?: AnyJson | undefined) => Promise<AnyJson>];
125 };
126} & {
127 withProject: {
128 output: unknown;
129 args: [SfProjectJson?: JsonMap | undefined];
130 };
131}>;
132export default test;
133export { expect, FancyTypes, Config, command, loadConfig, OclifConfig, test, $$, TestContext };