@types/lab
- Version 11.1.4
- Published
- 8.11 kB
- No dependencies
- MIT license
Install
npm i @types/labyarn add @types/labpnpm add @types/labOverview
TypeScript definitions for lab
Index
Variables
Functions
Interfaces
Type Aliases
Variables
variable assertions
const assertions: any;Access the configured assertion library.
Functions
function script
script: (options?: ScriptOptions) => Lab & ExperimentAlt & TestAlt;The test script.
Interfaces
interface AsyncOptions
interface AsyncOptions {}property timeout
timeout?: number | undefined;Set a specific timeout in milliseconds (disabled)
interface DoneNote
interface DoneNote {}property note
note: (text: string) => void;Attach a note to the test case
interface ExperimentAlt
interface ExperimentAlt {}property describe
describe: SkipOnlyExperiment;property experiment
experiment: SkipOnlyExperiment;property suite
suite: SkipOnlyExperiment;interface ExperimentOptions
interface ExperimentOptions {}property only
only?: boolean | undefined;Execute only this test/experiment? (false)
property parallel
parallel?: boolean | undefined;Execute tests in parallel? (false)
property skip
skip?: boolean | undefined;Skip execution? (false)
property timeout
timeout?: number | undefined;Set a specific timeout in milliseconds (2000)
interface Lab
interface Lab {}method after
after: { (cb: AsyncCallback): void; (promise: AsyncPromise): void; (options: AsyncOptions, cb: AsyncCallback): void; (options: AsyncOptions, promise: AsyncPromise): void;};Perform async actions after the test suite
Perform async actions after the test suite using a promise
Perform async actions after the test suite with options
Perform async actions after the test suite with options, using a promise
method afterEach
afterEach: { (cb: AsyncCallback): void; (promise: AsyncPromise): void; (options: AsyncOptions, cb: AsyncCallback): void; (options: AsyncOptions, promise: AsyncPromise): void;};Perform async actions after each test
Perform async actions after each test using a promise
Perform async actions after each test with options
Perform async actions after each test with options, using a promise
method before
before: { (cb: AsyncCallback): void; (promise: AsyncPromise): void; (options: AsyncOptions, cb: AsyncCallback): void; (options: AsyncOptions, promise: AsyncPromise): void;};Perform async actions before the test suite
Perform async actions before the test suite using a promise
Perform async actions before the test suite with options
Perform async actions before the test suite with otions, using a promise
method beforeEach
beforeEach: { (cb: AsyncCallback): void; (promise: AsyncPromise): void; (options: AsyncOptions, cb: AsyncCallback): void; (options: AsyncOptions, promise: AsyncPromise): void;};Perform async actions before each test
Perform async actions before each test using a promise
Perform async actions before each test with options
Perform async actions before each test with options, using a promise
method describe
describe: { (desc: string, cb: EmptyCallback): void; (desc: string, options: ExperimentOptions, cb: EmptyCallback): void;};Create a test suite
Create a test suite with options
method experiment
experiment: { (desc: string, cb: EmptyCallback): void; (desc: string, options: ExperimentOptions, cb: EmptyCallback): void;};Organise tests into an experiment
Organise tests into an experiment with options
method it
it: { (desc: string, cb: TestCallback): void; (desc: string, promise: TestPromise): void; (desc: string, options: TestOptions, cb: TestCallback): void; (desc: string, options: TestOptions, promise: TestPromise): void;};The test spec
The test spec using a promise
The test spec with options
The test spec using a promise with options
method suite
suite: { (desc: string, cb: EmptyCallback): void; (desc: string, options: ExperimentOptions, cb: EmptyCallback): void;};Create a test suite
Create a test suite with options
method test
test: { (desc: string, cb: TestCallback): void; (desc: string, promise: TestPromise): void; (desc: string, options: TestOptions, cb: TestCallback): void; (desc: string, options: TestOptions, promise: TestPromise): void;};The test spec
The test spec using a promise
The test spec with options
The test spec using a promise with options
interface ScriptOptions
interface ScriptOptions {}interface SkipOnlyExperiment
interface SkipOnlyExperiment {}interface SkipOnlyTest
interface SkipOnlyTest {}interface TestOptions
interface TestOptions extends ExperimentOptions {}property plan
plan?: number | undefined;The expected number of assertions to execute
Type Aliases
type AsyncCallback
type AsyncCallback = (done: DoneFunction) => void;type AsyncPromise
type AsyncPromise = () => Promise<any>;type CleanupFunction
type CleanupFunction = (func: (next: Function) => void) => void;type DoneFunction
type DoneFunction = (err?: Error) => void;type EmptyCallback
type EmptyCallback = () => void;type ExperimentArgs
type ExperimentArgs = (desc: string, cb: EmptyCallback) => {};type ExperimentWithOptionsArgs
type ExperimentWithOptionsArgs = ( desc: string, options: ExperimentOptions, cb: EmptyCallback) => {};type TestArgs
type TestArgs = (desc: string, cb: TestCallback) => {};type TestCallback
type TestCallback = ( done: DoneFunction & DoneNote, onCleanup?: CleanupFunction) => void;type TestPromise
type TestPromise = () => Promise<any>;type TestWithOptionsArgs
type TestWithOptionsArgs = ( desc: string, options: TestOptions, cb: TestCallback) => {};Package Files (1)
Dependencies (0)
No dependencies.
Dev Dependencies (0)
No dev dependencies.
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/@types/lab.
- Markdown[](https://www.jsdocs.io/package/@types/lab)
- HTML<a href="https://www.jsdocs.io/package/@types/lab"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>
- Updated .
Package analyzed in 2980 ms. - Missing or incorrect documentation? Open an issue for this package.
