Interface IServerTestOptions

Options for server tests.

interface IServerTestOptions {
    afterAll?: Nilable<AfterAllTestsFunc>;
    afterEach?: Nilable<AfterEachTestFunc>;
    allowEmptyTestSettings?: boolean;
    beforeAll?: Nilable<BeforeAllTestsFunc>;
    beforeEach?: Nilable<BeforeEachTestFunc>;
    exitCode?: Nilable<ExitWithCodeValue>;
    exitCodeOnFail?: Nilable<ExitWithCodeValue>;
    requiresModuleAsDefault?: Nilable<boolean>;
    requiresTestsEverywhere?: Nilable<boolean>;
    timeout?: Nilable<number>;
}

Properties

afterAll?: Nilable<AfterAllTestsFunc>

A custom function, which should be executed AFTER ALL tests. This is executed once.

afterEach?: Nilable<AfterEachTestFunc>

A custom function, which should be executed AFTER EACH tests.

allowEmptyTestSettings?: boolean

Allow empty test settings or not.

Default

false
beforeAll?: Nilable<BeforeAllTestsFunc>

A custom function, which should be executed BEFORE ALL tests. This is executed once.

beforeEach?: Nilable<BeforeEachTestFunc>

A custom function, which should be executed BEFORE EACH tests.

exitCode?: Nilable<ExitWithCodeValue>

The exit code, which should be used to exit the process automatically, after the tests ran successfully, while false indicates NOT to exit the process automatically.

Default

0
exitCodeOnFail?: Nilable<ExitWithCodeValue>

The exit code, which should be used to exit the process automatically, after the tests ran with errors, while false indicates NOT to exit the process automatically.

Default

1
requiresModuleAsDefault?: Nilable<boolean>

If no settings are specified, a module file with it is required.

Default

true
requiresTestsEverywhere?: Nilable<boolean>

This is value indicates, that all endpoints require at least one test.

Default

true
timeout?: Nilable<number>

Custom value for a (default) timeout for tests, in ms.

Default

5000

Generated using TypeDoc