The class can be used to build ChaiJS BDD style assertions that can be asserted against a running application from a WebDriverJS test. It supports a subset of assertions specified in the following documentation: https://www.chaijs.com/api/bdd/.

The following assertions are currently not supported: instanceof, throw, respondTo, satisfy, itself, change, increase, decrease, by

### Type parameters

- #### T = any

### Hierarchy

- Expectation

## Index

### Constructors

- constructor

### Properties

- assertion

### Accessors

- NaN
- all
- and
- any
- arguments
- at
- be
- been
- but
- deep
- does
- empty
- exist
- extensible
- false
- finite
- frozen
- has
- have
- is
- nested
- not
- null
- of
- ok
- ordered
- own
- same
- sealed
- still
- that
- to
- true
- undefined
- which
- with

### Methods

- a
- above
- below
- chainFunction
- chainGetter
- closeTo
- eql
- equal
- fail
- include
- keys
- least
- lengthOf
- match
- members
- most
- oneOf
- ownPropertyDescriptor
- property
- string
- within

## Constructors

### constructor

- new Expectation<T>(expression: string): Expectation<T>

- Create an Expectation to be evaluated on the client against the underlying data model.

  #### Type parameters

  - #### T = any

  #### Parameters

  - ##### expression: string

    An expression statement to be evaluated for this Expectation against the underlying viewmodel/page var

  #### Returns Expectation<T>

## Properties

### assertion

assertion: { chain: any[]; expression: string }

#### Type declaration

- ##### chain: any[]

- ##### expression: string

## Accessors

### NaN

- get NaN(): Expectation<T>

- #### Returns Expectation<T>

### all

- get all(): Expectation<T>

- #### Returns Expectation<T>

### and

- get and(): Expectation<T>

- #### Returns Expectation<T>

### any

- get any(): Expectation<T>

- #### Returns Expectation<T>

### arguments

- get arguments(): Expectation<T>

- #### Returns Expectation<T>

### at

- get at(): Expectation<T>

- #### Returns Expectation<T>

### be

- get be(): Expectation<T>

- #### Returns Expectation<T>

### been

- get been(): Expectation<T>

- #### Returns Expectation<T>

### but

- get but(): Expectation<T>

- #### Returns Expectation<T>

### deep

- get deep(): Expectation<T>

- #### Returns Expectation<T>

### does

- get does(): Expectation<T>

- #### Returns Expectation<T>

### empty

- get empty(): Expectation<T>

- #### Returns Expectation<T>

### exist

- get exist(): Expectation<T>

- #### Returns Expectation<T>

### extensible

- get extensible(): Expectation<T>

- #### Returns Expectation<T>

### false

- get false(): Expectation<T>

- #### Returns Expectation<T>

### finite

- get finite(): Expectation<T>

- #### Returns Expectation<T>

### frozen

- get frozen(): Expectation<T>

- #### Returns Expectation<T>

### has

- get has(): Expectation<T>

- #### Returns Expectation<T>

### have

- get have(): Expectation<T>

- #### Returns Expectation<T>

### is

- get is(): Expectation<T>

- #### Returns Expectation<T>

### nested

- get nested(): Expectation<T>

- #### Returns Expectation<T>

### not

- get not(): Expectation<T>

- #### Returns Expectation<T>

### null

- get null(): Expectation<T>

- #### Returns Expectation<T>

### of

- get of(): Expectation<T>

- #### Returns Expectation<T>

### ok

- get ok(): Expectation<T>

- #### Returns Expectation<T>

### ordered

- get ordered(): Expectation<T>

- #### Returns Expectation<T>

### own

- get own(): Expectation<T>

- #### Returns Expectation<T>

### same

- get same(): Expectation<T>

- #### Returns Expectation<T>

### sealed

- get sealed(): Expectation<T>

- #### Returns Expectation<T>

### still

- get still(): Expectation<T>

- #### Returns Expectation<T>

### that

- get that(): Expectation<T>

- #### Returns Expectation<T>

### to

- get to(): Expectation<T>

- #### Returns Expectation<T>

### true

- get true(): Expectation<T>

- #### Returns Expectation<T>

### undefined

- get undefined(): Expectation<T>

- #### Returns Expectation<T>

### which

- get which(): Expectation<T>

- #### Returns Expectation<T>

### with

- get with(): Expectation<T>

- #### Returns Expectation<T>

## Methods

### a

- a(type: string, msg?: string): Expectation<T>

- #### Parameters

  - ##### type: string

  - ##### Optional msg: string

  #### Returns Expectation<T>

### above

- above(n: number, msg?: string): Expectation<T>

- #### Parameters

  - ##### n: number

  - ##### Optional msg: string

  #### Returns Expectation<T>

### below

- below(n: number, msg?: string): Expectation<T>

- #### Parameters

  - ##### n: number

  - ##### Optional msg: string

  #### Returns Expectation<T>

### chainFunction

- chainFunction(name: string, ...args: any[]): Expectation<T>

- #### Parameters

  - ##### name: string

  - ##### Rest ...args: any[]

  #### Returns Expectation<T>

### chainGetter

- chainGetter(name: string): Expectation<T>

- #### Parameters

  - ##### name: string

  #### Returns Expectation<T>

### closeTo

- closeTo(expected: number, delta: number, msg?: string): Expectation<T>

- #### Parameters

  - ##### expected: number

  - ##### delta: number

  - ##### Optional msg: string

  #### Returns Expectation<T>

### eql

- eql(obj: object, msg?: string): Expectation<T>

- #### Parameters

  - ##### obj: object

  - ##### Optional msg: string

  #### Returns Expectation<T>

### equal

- equal(val: any, msg?: string): Expectation<T>

- #### Parameters

  - ##### val: any

  - ##### Optional msg: string

  #### Returns Expectation<T>

### fail

- fail(...args: any[]): Expectation<T>

- #### Parameters

  - ##### Rest ...args: any[]

  #### Returns Expectation<T>

### include

- include(val: any, msg?: string): Expectation<T>

- #### Parameters

  - ##### val: any

  - ##### Optional msg: string

  #### Returns Expectation<T>

### keys

- keys(...keys: (string | object | string[])[]): Expectation<T>

- #### Parameters

  - ##### Rest ...keys: (string | object | string[])[]

  #### Returns Expectation<T>

### least

- least(n: number, msg?: string): Expectation<T>

- #### Parameters

  - ##### n: number

  - ##### Optional msg: string

  #### Returns Expectation<T>

### lengthOf

- lengthOf(n: number, msg?: string): Expectation<T>

- #### Parameters

  - ##### n: number

  - ##### Optional msg: string

  #### Returns Expectation<T>

### match

- match(re: RegExp, msg?: string): Expectation<T>

- #### Parameters

  - ##### re: RegExp

  - ##### Optional msg: string

  #### Returns Expectation<T>

### members

- members(set: any[], msg?: string): Expectation<T>

- #### Parameters

  - ##### set: any[]

  - ##### Optional msg: string

  #### Returns Expectation<T>

### most

- most(n: number, msg?: string): Expectation<T>

- #### Parameters

  - ##### n: number

  - ##### Optional msg: string

  #### Returns Expectation<T>

### oneOf

- oneOf(list: any[], msg?: string): Expectation<T>

- #### Parameters

  - ##### list: any[]

  - ##### Optional msg: string

  #### Returns Expectation<T>

### ownPropertyDescriptor

- ownPropertyDescriptor(name: string, descriptor?: object, msg?: string): Expectation<T>

- #### Parameters

  - ##### name: string

  - ##### Optional descriptor: object

  - ##### Optional msg: string

  #### Returns Expectation<T>

### property

- property(name: string, val?: any, msg?: string): Expectation<T>

- #### Parameters

  - ##### name: string

  - ##### Optional val: any

  - ##### Optional msg: string

  #### Returns Expectation<T>

### string

- string(str: string, msg?: string): Expectation<T>

- #### Parameters

  - ##### str: string

  - ##### Optional msg: string

  #### Returns Expectation<T>

### within

- within(start: number, finish: number, msg?: string): Expectation<T>

- #### Parameters

  - ##### start: number

  - ##### finish: number

  - ##### Optional msg: string

  #### Returns Expectation<T>

Generated using TypeDoc