UNPKG

declarative-e2e-test

Version:
18 lines (17 loc) 679 B
import { ITest } from 'declarative-test-structure-generator'; import { Response } from 'supertest'; import { ITestedRequest } from './request'; interface ITestBlock extends Omit<ITest, 'test'>, ITestedRequest { } /** * The properties in the definition are used in each step if no values are defined. * Url and expect should be defined in the steps */ interface ITestBlockWithSteps extends Omit<ITestBlock, 'url' | 'expect'> { steps: TestStepType[]; } export interface ITestStep extends ITestedRequest { } export declare type TestStepType = ITestStep | ((resp: Response) => ITestStep); export declare type TestBlockDefinition = ITestBlock | ITestBlockWithSteps; export {};