@oclif/test

  • Version 2.1.1
  • Published
  • 31.5 kB
  • 2 dependencies
  • MIT license

Install

npm i @oclif/test
yarn add @oclif/test
pnpm add @oclif/test

Overview

test helpers for oclif components

Index

Variables

Functions

Variables

variable test

const test: FancyTypes.Base<
FancyTypes.Context,
{ skip: { output: unknown; args: [] } } & {
only: { output: unknown; args: [] };
} & { retries: { output: unknown; args: [count: number] } } & {
catch: {
output: { error: Error };
args: [
arg: string | RegExp | ((err: Error) => any),
opts?: { raiseIfNotThrown?: boolean | undefined }
];
};
} & {
env: { output: unknown; args: [env: { [k: string]: string }, opts?: any] };
} & {
stub: {
output: { stubs: any[] };
args: [object: any, path: any, value: () => any];
};
} & {
stdin: {
output: unknown;
args: [input: string, delay?: number | undefined];
};
} & {
stderr: {
output: { readonly stderr: string };
args: [
opts?:
| {
print?: boolean | undefined;
stripColor?: boolean | undefined;
}
| undefined
];
};
} & {
stdout: {
output: { readonly stdout: string };
args: [
opts?:
| {
print?: boolean | undefined;
stripColor?: boolean | undefined;
}
| undefined
];
};
} & {
nock: {
output: { nock: number };
args: [
host: string,
options: FancyTypes.NockOptions | FancyTypes.NockCallback,
cb?: FancyTypes.NockCallback | undefined
];
};
} & {
timeout: {
output: { timeout: number };
args: [timeout?: number | undefined];
};
} & {
loadConfig: {
output: { config: import('@oclif/core/lib/interfaces').Config };
args: [opts?: loadConfig.Options | undefined];
};
} & {
command: {
output: {
config: import('@oclif/core/lib/interfaces').Config;
expectation: string;
};
args: [args: string | string[], opts?: loadConfig.Options | undefined];
};
} & { exit: { output: { error: any }; args: [code?: number | undefined] } } & {
hook: {
output: {
config: import('@oclif/core/lib/interfaces').Config;
expectation: string;
};
args: [
event: string,
hookOpts?: Record<string, unknown> | undefined,
options?: loadConfig.Options | undefined
];
};
}
>;

    Functions

    function command

    command: (
    args: string[] | string,
    opts?: loadConfig.Options
    ) => { run(ctx: { config: Interfaces.Config; expectation: string }): Promise<void> };

      Package Files (2)

      Dependencies (2)

      Dev Dependencies (13)

      Peer Dependencies (0)

      No peer dependencies.

      Badge

      To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

      You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@oclif/test.

      • Markdown
        [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/@oclif/test)
      • HTML
        <a href="https://www.jsdocs.io/package/@oclif/test"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>