Skip to content

Latest commit

 

History

History
464 lines (257 loc) · 8.42 KB

File metadata and controls

464 lines (257 loc) · 8.42 KB

@onzag/itemize / Modules / testing/client / ClientTest

Class: ClientTest

testing/client.ClientTest

Defines a test, and it should be used as an entry for all subtests

Hierarchy

  • Test

    ClientTest

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new ClientTest(https, host, port, testingInfo, puppet): ClientTest

Parameters

Name Type
https boolean
host string
port string | number
testingInfo ITestingInfoType
puppet Browser

Returns

ClientTest

Overrides

Test.constructor

Defined in

testing/client/index.ts:18

Properties

fullHost

Private fullHost: string

Defined in

testing/client/index.ts:16


host

Private host: string

Defined in

testing/client/index.ts:11


https

Private https: boolean

Defined in

testing/client/index.ts:13


port

Private port: string | number

Defined in

testing/client/index.ts:12


puppet

Private puppet: Browser

Defined in

testing/client/index.ts:14


testingInfo

Private testingInfo: ITestingInfoType

Defined in

testing/client/index.ts:10

Methods

after

after(): void

Executes after everything is done use for cleanup

Returns

void

Overrides

Test.after

Defined in

testing/client/index.ts:52


before

before(): Promise<void>

Executes before, override this function it allows you to dinamically add tests as well

Returns

Promise<void>

Overrides

Test.before

Defined in

testing/client/index.ts:34


construtor

construtor(): void

Build a brand new instance

Returns

void

Inherited from

Test.construtor

Defined in

testing/index.ts:98


define

define(label, test?): void

Define a new test

Parameters

Name Type Default value Description
label string undefined the label for the test
test Test null the test instance

Returns

void

Inherited from

Test.define

Defined in

testing/index.ts:141


describe

describe(): void

Executes during just after before has been executed

Returns

void

Overrides

Test.describe

Defined in

testing/client/index.ts:38


info

info(txt): WarnHandle

Provides information during the test

Parameters

Name Type
txt string

Returns

WarnHandle

Inherited from

Test.info

Defined in

testing/index.ts:211


it

it(label, fn?): ItHandle

Define a new assertion

Parameters

Name Type Default value Description
label string undefined the label for the assertion
fn () => void | PromiseLike<void> null the assetion to execute

Returns

ItHandle

Inherited from

Test.it

Defined in

testing/index.ts:157


quit

quit(): void

Quits this test

Returns

void

Inherited from

Test.quit

Defined in

testing/index.ts:278


skipAll

skipAll(): void

Skips all the following IT tests regardless of layer

Returns

void

Inherited from

Test.skipAll

Defined in

testing/index.ts:236


skipLayer

skipLayer(): void

Skip all the tests that are on the same layer only

because .it and .step can be nested inside others, and they count as their own child layer

Returns

void

Inherited from

Test.skipLayer

Defined in

testing/index.ts:253


skipNext

skipNext(): void

Skip all the next IT tests they should be on the same layer it will not skip what's on a deeper layer

Returns

void

Inherited from

Test.skipNext

Defined in

testing/index.ts:222


step

step(fn?): ItHandle

Defines a new step, works similar to defining an assertion but it has no label and is just a singular hidden step

Parameters

Name Type Default value
fn () => void | PromiseLike<void> null

Returns

ItHandle

Inherited from

Test.step

Defined in

testing/index.ts:178


wait

wait(ms): Promise<void>

Helper function to wait

Parameters

Name Type
ms number

Returns

Promise<void>

Inherited from

Test.wait

Defined in

testing/index.ts:269


warn

warn(txt): WarnHandle

Warns during the test

Parameters

Name Type
txt string

Returns

WarnHandle

Inherited from

Test.warn

Defined in

testing/index.ts:195