assert
Functions
- equal(a, b, [m])
- notEqual(a, b, [m])
- notOk(t, [m])
- logicalEquals(a, b, [m])
- assert(t, [m])
- greaterThan(a, b, [m])
- lessThan(a, b, [m])
- greaterThanOrEqual(a, b, [m])
- lessThanOrEqual(a, b, [m])
- typeOf(value, type, valueName)
- arrayHas(haystack, needle, [message])
- arrayHasNo(haystack, needle, [message])
- arrayEqual(a, b, [message])
equal(a, b, [m])
Kind: global function
Param | Type |
---|---|
a | T |
b | T |
[m] | string |
notEqual(a, b, [m])
Kind: global function
Param | Type |
---|---|
a | T |
b | T |
[m] | string |
notOk(t, [m])
Kind: global function
Param | Type |
---|---|
t | boolean |
[m] | string |
logicalEquals(a, b, [m])
Kind: global function
Param | Type |
---|---|
a | object |
b | object |
[m] | string |
assert(t, [m])
Kind: global function
Param | Type |
---|---|
t | boolean |
[m] | string |
- assert(t, [m])
- .enum(value, enumerable, [name])
- .isInstanceOf(value, klass, [value_name], [class_name])
- .isNumber(value, [name])
- .isString(value, [name])
- .isBoolean(value, [name])
- .isFunction(value, [name])
- .isObject(value, [name])
- .isInteger(value, [name])
- .isNonNegativeInteger(value, [name])
- .isArray(value, name)
- .isArrayLike(value, name)
- .defined(value, [name])
- .isNull(value, [name])
- .notNull(value, [name])
- .notNaN(value, name)
- .isFiniteNumber(value, name)
- .that(value, name, matcher)
assert.enum(value, enumerable, [name])
Kind: static method of assert
Param | Type |
---|---|
value | T |
enumerable | Object.<T> |
[name] | string |
assert.isInstanceOf(value, klass, [value_name], [class_name])
Kind: static method of assert
Param | Type |
---|---|
value | * |
klass | Class |
[value_name] | string |
[class_name] | string |
assert.isNumber(value, [name])
Kind: static method of assert
Param | Type |
---|---|
value | number | * |
[name] | string |
assert.isString(value, [name])
Kind: static method of assert
Param | Type |
---|---|
value | string | * |
[name] | string |
assert.isBoolean(value, [name])
Kind: static method of assert
Param | Type |
---|---|
value | boolean | * |
[name] | string |
assert.isFunction(value, [name])
Kind: static method of assert
Param | Type |
---|---|
value | function | * |
[name] | string |
assert.isObject(value, [name])
Kind: static method of assert
Param | Type |
---|---|
value | Object | * |
[name] | string |
assert.isInteger(value, [name])
Kind: static method of assert
Param | Type |
---|---|
value | number | * |
[name] | string |
assert.isNonNegativeInteger(value, [name])
Kind: static method of assert
Param | Type |
---|---|
value | number | * |
[name] | string |
assert.isArray(value, name)
Kind: static method of assert
Param | Type |
---|---|
value | Array.<T> |
name | string |
assert.isArrayLike(value, name)
Kind: static method of assert
Param | Type |
---|---|
value | ArrayLike.<T> | Array.<T> | Uint32Array | Float32Array |
name | string |
assert.defined(value, [name])
Kind: static method of assert
Param | Type |
---|---|
value | * |
[name] | String |
assert.isNull(value, [name])
Kind: static method of assert
Param | Type |
---|---|
value | * |
[name] | String |
assert.notNull(value, [name])
Kind: static method of assert
Param | Type |
---|---|
value | * |
[name] | String |
assert.notNaN(value, name)
Kind: static method of assert
Param | Type |
---|---|
value | number |
name | string |
assert.isFiniteNumber(value, name)
Kind: static method of assert
Param | Type |
---|---|
value | number |
name | string |
assert.that(value, name, matcher)
Kind: static method of assert
Param | Type |
---|---|
value | T |
name | string |
matcher | Matcher.<T> |
greaterThan(a, b, [m])
Kind: global function
Param | Type |
---|---|
a | number |
b | number |
[m] | string |
lessThan(a, b, [m])
Kind: global function
Param | Type |
---|---|
a | number |
b | number |
[m] | string |
greaterThanOrEqual(a, b, [m])
Kind: global function
Param | Type |
---|---|
a | number |
b | number |
[m] | string |
lessThanOrEqual(a, b, [m])
Kind: global function
Param | Type |
---|---|
a | number |
b | number |
[m] | string |
typeOf(value, type, valueName)
Kind: global function
Param | Type | Default |
---|---|---|
value | * | |
type | string | |
valueName | string | "value" |
arrayHas(haystack, needle, [message])
Kind: global function
Param | Type | Default |
---|---|---|
haystack | Array.<T> | |
needle | T | |
[message] | string | "Array does not contain the item" |
arrayHasNo(haystack, needle, [message])
Kind: global function
Param | Type | Default |
---|---|---|
haystack | Array.<T> | |
needle | T | |
[message] | string | "Array contains the item" |
arrayEqual(a, b, [message])
Kind: global function
Param | Type | Default |
---|---|---|
a | Array.<T> | ArrayLike.<T> | Float32Array | Int32Array | |
b | Array.<T> | ArrayLike.<T> | Float32Array | Int32Array | |
[message] | string | "Arrays are not equal" |