lab
- Version 18.0.2
- Published
- 164 kB
- 17 dependencies
- BSD-3-Clause license
Install
npm i lab
yarn add lab
pnpm add lab
Overview
Test utility
Index
Variables
Functions
Interfaces
Variables
variable assertions
const assertions: any;
Functions
function script
script: (options?: ScriptOptions) => Script;
Interfaces
interface After
interface After {}
call signature
(operation: Operation): void;
call signature
(options: Options, operation: Operation): void;
interface Before
interface Before extends After {}
interface Experiment
interface Experiment extends ExperimentFunction {}
interface ExperimentFunction
interface ExperimentFunction {}
call signature
(title: String, experiment: () => void): void;
call signature
(title: String, options: ExperimentOptions, experiment: () => void): void;
interface ExperimentOptions
interface ExperimentOptions extends Options {}
interface Flags
interface Flags extends OperationFlags {}
method note
note: (note: string) => void;
method onCleanup
onCleanup: (operation: Operation) => void;
method onUncaughtException
onUncaughtException: (err: Error) => void;
method onUnhandledRejection
onUnhandledRejection: (err: Error) => void;
interface Operation
interface Operation {}
call signature
<T>(flags: OperationFlags): Promise<T> | void;
call signature
(flags: OperationFlags): void;
interface OperationFlags
interface OperationFlags {}
property context
context: Record<string, any>;
interface Options
interface Options {}
property timeout
timeout?: number;
number of ms to wait for test/experiment to execute
interface Script
interface Script {}
property after
after: After;
property afterEach
afterEach: After;
property before
before: Before;
property beforeEach
beforeEach: Before;
property describe
describe: Experiment;
property experiment
experiment: Experiment;
property it
it: Test;
property suite
suite: Experiment;
property test
test: Test;
method expect
expect: (value: any) => any;
interface ScriptOptions
interface ScriptOptions {}
interface Test
interface Test {}
method only
only: { (title: String, test: TestFunction): void; (title: String, options: TestOptionsOnlySkip, test: TestFunction): void;};
only execute this test
method skip
skip: { (title: String, test: TestFunction): void; (title: String, options: TestOptionsOnlySkip, test: TestFunction): void;};
skip this test
call signature
(title: String, test: TestFunction): void;
call signature
(title: String, options: TestOptions, test: TestFunction): void;
interface TestFunction
interface TestFunction {}
call signature
<T>(flags: Flags): Promise<T> | void;
call signature
(flags: Flags): void;
interface TestOptions
interface TestOptions extends ExperimentOptions, Plan {}
interface TestOptionsOnlySkip
interface TestOptionsOnlySkip extends Options, Plan {}
Package Files (1)
Dependencies (17)
Dev Dependencies (6)
Peer Dependencies (0)
No peer dependencies.
Badge
To add a badge like this oneto 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/lab
.
- Markdown[![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/lab)
- HTML<a href="https://www.jsdocs.io/package/lab"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>
- Updated .
Package analyzed in 1089 ms. - Missing or incorrect documentation? Open an issue for this package.