@oclif/test

  • Version 3.2.9
  • Published
  • 19.8 kB
  • 3 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: fancyTest.FancyTypes.Base<
fancyTest.FancyTypes.Context,
{ skip: { output: unknown; args: [] } } & {
only: { output: unknown; args: [] };
} & { retries: { output: unknown; args: any[] } } & {
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: { sandbox: import('sinon').SinonSandbox };
args: [object: any, path: any, fn: (stub: any) => 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:
| fancyTest.FancyTypes.NockOptions
| fancyTest.FancyTypes.NockCallback,
cb?: fancyTest.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;
returned: unknown;
};
args: [args: string | string[], opts?: loadConfig.Options | undefined];
};
} & {
exit: {
output: { error: import('@oclif/core/lib/errors').CLIError };
args: [code?: number | undefined];
};
} & {
hook: {
output: {
config: import('@oclif/core/lib/interfaces').Config;
expectation: string;
returned: unknown;
};
args: [
event: string,
hookOpts?: Record<string, unknown> | undefined,
options?: loadConfig.Options | undefined
];
};
}
>;

    Functions

    function command

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

      Package Files (2)

      Dependencies (3)

      Dev Dependencies (18)

      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>