# Class Expectation<T>

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): 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, msg?): Expectation<T>

- #### Parameters

  - ##### type: string

  - ##### `Optional` msg: string

  #### Returns Expectation<T>

### above

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

- #### Parameters

  - ##### n: number

  - ##### `Optional` msg: string

  #### Returns Expectation<T>

### below

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

- #### Parameters

  - ##### n: number

  - ##### `Optional` msg: string

  #### Returns Expectation<T>

### chainFunction

- chainFunction(name, ...args): Expectation<T>

- #### Parameters

  - ##### name: string

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

  #### Returns Expectation<T>

### chainGetter

- chainGetter(name): Expectation<T>

- #### Parameters

  - ##### name: string

  #### Returns Expectation<T>

### closeTo

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

- #### Parameters

  - ##### expected: number

  - ##### delta: number

  - ##### `Optional` msg: string

  #### Returns Expectation<T>

### eql

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

- #### Parameters

  - ##### obj: object

  - ##### `Optional` msg: string

  #### Returns Expectation<T>

### equal

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

- #### Parameters

  - ##### val: any

  - ##### `Optional` msg: string

  #### Returns Expectation<T>

### fail

- fail(...args): Expectation<T>

- #### Parameters

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

  #### Returns Expectation<T>

### include

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

- #### Parameters

  - ##### val: any

  - ##### `Optional` msg: string

  #### Returns Expectation<T>

### keys

- keys(...keys): Expectation<T>

- #### Parameters

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

  #### Returns Expectation<T>

### least

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

- #### Parameters

  - ##### n: number

  - ##### `Optional` msg: string

  #### Returns Expectation<T>

### lengthOf

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

- #### Parameters

  - ##### n: number

  - ##### `Optional` msg: string

  #### Returns Expectation<T>

### match

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

- #### Parameters

  - ##### re: RegExp

  - ##### `Optional` msg: string

  #### Returns Expectation<T>

### members

- members(set, msg?): Expectation<T>

- #### Parameters

  - ##### set: any[]

  - ##### `Optional` msg: string

  #### Returns Expectation<T>

### most

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

- #### Parameters

  - ##### n: number

  - ##### `Optional` msg: string

  #### Returns Expectation<T>

### oneOf

- oneOf(list, msg?): Expectation<T>

- #### Parameters

  - ##### list: any[]

  - ##### `Optional` msg: string

  #### Returns Expectation<T>

### ownPropertyDescriptor

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

- #### Parameters

  - ##### name: string

  - ##### `Optional` descriptor: object

  - ##### `Optional` msg: string

  #### Returns Expectation<T>

### property

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

- #### Parameters

  - ##### name: string

  - ##### `Optional` val: any

  - ##### `Optional` msg: string

  #### Returns Expectation<T>

### string

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

- #### Parameters

  - ##### str: string

  - ##### `Optional` msg: string

  #### Returns Expectation<T>

### within

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

- #### Parameters

  - ##### start: number

  - ##### finish: number

  - ##### `Optional` msg: string

  #### Returns Expectation<T>

Generated using TypeDoc