Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

Callable

  • Assertion(message?: string): Assertion
  • Assertion(type: string, message?: string): Assertion
  • Assertion(type: string, message?: string): Assertion
  • Assertion(type: string, message?: string): Assertion
  • Assertion(type: string, message?: string): Assertion
  • Parameters

    • Optional message: string

    Returns Assertion

  • Parameters

    • type: string
    • Optional message: string

    Returns Assertion

  • Parameters

    • type: string
    • Optional message: string

    Returns Assertion

  • Parameters

    • type: string
    • Optional message: string

    Returns Assertion

  • Parameters

    • type: string
    • Optional message: string

    Returns Assertion

Index

Properties

Arguments

Arguments: Assertion

NaN

Throw

Throw: Throw

a

above

all

always

always: Assertion

an

and

any

approximately

approximately: CloseTo

arguments

arguments: Assertion

at

be

been

been: Assertion

below

but

change

changes

closeTo

closeTo: CloseTo

contain

contain: Include

contains

contains: Include

decrease

decrease: PropertyChange

decreases

decreases: PropertyChange

deep

deep: Deep

does

does: Assertion

empty

empty: Assertion

ensure

ensure: Assertion

eq

eq: Equal

eql

eql: Equal

eqls

eqls: Equal

equal

equal: Equal

equals

equals: Equal

eventually

eventually: PromisedAssertion

exist

exist: Assertion

extensible

extensible: Assertion

false

false: Assertion

finite

finite: Assertion

frozen

frozen: Assertion

fulfilled

greaterThan

greaterThan: NumberComparer

greaterThanOrEqual

greaterThanOrEqual: NumberComparer

gt

gte

has

have

have: Assertion

haveOwnProperty

haveOwnProperty: Property

haveOwnPropertyDescriptor

haveOwnPropertyDescriptor: OwnPropertyDescriptor

include

include: Include

includes

includes: Include

increase

increase: PropertyChange

increases

increases: PropertyChange

instanceOf

instanceOf: InstanceOf

instanceof

instanceof: InstanceOf

is

itself

itself: Assertion

keys

keys: Keys

least

length

length: Length

lengthOf

lengthOf: Length

lessThan

lessThan: NumberComparer

lessThanOrEqual

lessThanOrEqual: NumberComparer

lt

lte

match

match: Match

matches

matches: Match

members

members: Members

most

nested

nested: Nested

not

null

null: Assertion

of

ok

oneOf

oneOf: OneOf

ordered

ordered: Ordered

own

own: Own

ownProperty

ownProperty: Property

ownPropertyDescriptor

ownPropertyDescriptor: OwnPropertyDescriptor

property

property: Property

rejected

rejectedWith

rejectedWith: PromisedThrow

respondTo

respondTo: RespondTo

respondsTo

respondsTo: RespondTo

same

same: Assertion

satisfies

satisfies: Satisfy

satisfy

satisfy: Satisfy

sealed

sealed: Assertion

that

that: Assertion

throw

throw: Throw

throws

throws: Throw

to

true

true: Assertion

undefined

undefined: Assertion

which

which: Assertion

with

with: Assertion

Methods

become

  • Parameters

    • expected: any

    Returns PromisedAssertion

containIgnoreCase

  • containIgnoreCase(expected: string, msg?: string): Assertion
  • Parameters

    • expected: string
    • Optional msg: string

    Returns Assertion

containIgnoreSpaces

  • containIgnoreSpaces(expected: string, msg?: string): Assertion
  • Parameters

    • expected: string
    • Optional msg: string

    Returns Assertion

containSubset

  • Parameters

    • expected: any

    Returns Assertion

endWith

  • endWith(expected: string, message?: string): Assertion
  • Parameters

    • expected: string
    • Optional message: string

    Returns Assertion

endsWith

  • endsWith(expected: string, message?: string): Assertion
  • Parameters

    • expected: string
    • Optional message: string

    Returns Assertion

entriesCount

  • entriesCount(substr: string, expected: number, message?: string): Assertion
  • Parameters

    • substr: string
    • expected: number
    • Optional message: string

    Returns Assertion

equalBytes

  • Compares byte arrays on per-element basis.

    example

    expect(new Uint8Array([1, 2])).to.equalBytes([1, 2]); expect(new Uint8Array[65, 66, 67])).to.equalBytes('414243');

    Parameters

    • Optional bytes: string | ArrayLike<number>

      Expected bytes encoded as a hex string or an array-like object

    Returns Assertion

equalIgnoreCase

  • equalIgnoreCase(expected: string, message?: string): Assertion
  • Parameters

    • expected: string
    • Optional message: string

    Returns Assertion

equalIgnoreSpaces

  • equalIgnoreSpaces(expected: string, message?: string): Assertion
  • Parameters

    • expected: string
    • Optional message: string

    Returns Assertion

indexOf

  • indexOf(str: string, substr: string, index: number, msg?: string): Assertion
  • Parameters

    • str: string
    • substr: string
    • index: number
    • Optional msg: string

    Returns Assertion

key

  • Parameters

    • string: string

    Returns Assertion

notify

palindrome

  • Parameters

    • Optional message: string

    Returns Assertion

reverseOf

  • Parameters

    • Optional message: string

    Returns Assertion

singleLine

  • Parameters

    • Optional message: string

    Returns Assertion

startWith

  • startWith(expected: string, message?: string): Assertion
  • Parameters

    • expected: string
    • Optional message: string

    Returns Assertion

startsWith

  • startsWith(expected: string, message?: string): Assertion
  • Parameters

    • expected: string
    • Optional message: string

    Returns Assertion

string

  • string(string: string, message?: string): Assertion
  • Parameters

    • string: string
    • Optional message: string

    Returns Assertion

within

  • within(start: number, finish: number, message?: string): Assertion
  • within(start: Date, finish: Date, message?: string): Assertion