ValueChecker type (joe.test)


A fluent test checker for arbitrary values. Use check(value) to create one.

Initializer

Methods

ValueChecker Initializer


ValueChecker(value) → ValueChecker

Initializes the new checker with the given value.

Methods


valueChecker.containsAll()


valueChecker.containsAll(values...) → this

Assumes that the value is a collection, and verifies that it contains all of the expected arguments.

valueChecker.eq()


valueChecker.eq(expected) → this

Checks that the value is equal to the expected value.

valueChecker.hasType()


valueChecker.hasType(type) → this

Checks that the value has the given type.

valueChecker.hasTypeName()


valueChecker.hasTypeName(name) → this

Checks that the value's type has the given name.

valueChecker.isEmpty()


valueChecker.isEmpty() → this

Checks that the value isEmpty() according to its own isEmpty() method.

valueChecker.isFalse()


valueChecker.isFalse() → this

Checks that the value is falsey.

valueChecker.isNotNull()


valueChecker.isNotNull() → this

Checks that the value is not null

valueChecker.isNull()


valueChecker.isNull() → this

Checks that the value is null

valueChecker.isTrue()


valueChecker.isTrue() → this

Checks that the value is truthy.