Testing
Functions for assertions and testing Ferret queries.
t::approx
3-parameter signature
t::approx(actual, expected, tolerance)
Tests whether two numeric values are within an inclusive tolerance.
- Parameters
actualInt | FloatActual numeric value.expectedInt | FloatExpected numeric value.toleranceInt | FloatMaximum non-negative difference.
- Returns
NoneNo value is produced when the configured assertion succeeds.
4-parameter signature
t::approx(actual, expected, tolerance, message)
Tests whether two numeric values are within an inclusive tolerance.
- Parameters
actualInt | FloatActual numeric value.expectedInt | FloatExpected numeric value.toleranceInt | FloatMaximum non-negative difference.messageStringMessage to display on error.
- Returns
NoneNo value is produced when the configured assertion succeeds.
t::array
1-parameter signature
t::array(actual)
Tests whether the value has the array type.
- Parameters
actualAnyValue to test.
- Returns
NoneNo value is produced when the configured assertion succeeds.
2-parameter signature
t::array(actual, message)
Tests whether the value has the array type.
- Parameters
actualAnyValue to test.messageStringMessage to display on error.
- Returns
NoneNo value is produced when the configured assertion succeeds.
t::between
3-parameter signature
t::between(value, min, max)
Tests whether a value is within inclusive minimum and maximum boundaries.
- Parameters
valueAnyValue to test.minAnyInclusive minimum boundary.maxAnyInclusive maximum boundary.
- Returns
NoneNo value is produced when the configured assertion succeeds.
4-parameter signature
t::between(value, min, max, message)
Tests whether a value is within inclusive minimum and maximum boundaries.
- Parameters
valueAnyValue to test.minAnyInclusive minimum boundary.maxAnyInclusive maximum boundary.messageStringMessage to display on error.
- Returns
NoneNo value is produced when the configured assertion succeeds.
t::binary
1-parameter signature
t::binary(actual)
Tests whether the value has the binary type.
- Parameters
actualAnyValue to test.
- Returns
NoneNo value is produced when the configured assertion succeeds.
2-parameter signature
t::binary(actual, message)
Tests whether the value has the binary type.
- Parameters
actualAnyValue to test.messageStringMessage to display on error.
- Returns
NoneNo value is produced when the configured assertion succeeds.
t::bool
1-parameter signature
t::bool(actual)
Tests whether the value has the Boolean type.
- Parameters
actualAnyValue to test.
- Returns
NoneNo value is produced when the configured assertion succeeds.
2-parameter signature
t::bool(actual, message)
Tests whether the value has the Boolean type.
- Parameters
actualAnyValue to test.messageStringMessage to display on error.
- Returns
NoneNo value is produced when the configured assertion succeeds.
t::contains
2-parameter signature
t::contains(actual, expected)
Tests whether the actual container contains the expected value.
- Parameters
actualString | Array | Object | IterableHaystack value.expectedAnyExpected value.
- Returns
NoneNo value is produced when the configured assertion succeeds.
3-parameter signature
t::contains(actual, expected, message)
Tests whether the actual container contains the expected value.
- Parameters
actualString | Array | Object | IterableHaystack value.expectedAnyExpected value.messageStringMessage to display on error.
- Returns
NoneNo value is produced when the configured assertion succeeds.
t::datetime
1-parameter signature
t::datetime(actual)
Tests whether the value has the DateTime type.
- Parameters
actualAnyValue to test.
- Returns
NoneNo value is produced when the configured assertion succeeds.
2-parameter signature
t::datetime(actual, message)
Tests whether the value has the DateTime type.
- Parameters
actualAnyValue to test.messageStringMessage to display on error.
- Returns
NoneNo value is produced when the configured assertion succeeds.
t::duration
1-parameter signature
t::duration(actual)
Tests whether the value has the Duration type.
- Parameters
actualAnyValue to test.
- Returns
NoneNo value is produced when the configured assertion succeeds.
2-parameter signature
t::duration(actual, message)
Tests whether the value has the Duration type.
- Parameters
actualAnyValue to test.messageStringMessage to display on error.
- Returns
NoneNo value is produced when the configured assertion succeeds.
t::empty
1-parameter signature
t::empty(actual)
Tests whether the target is empty.
- Parameters
actualMeasurable | Binary | Object | Any[] | StringValue to test.
- Returns
NoneNo value is produced when the configured assertion succeeds.
2-parameter signature
t::empty(actual, message)
Tests whether the target is empty.
- Parameters
actualMeasurable | Binary | Object | Any[] | StringValue to test.messageStringMessage to display on error.
- Returns
NoneNo value is produced when the configured assertion succeeds.
t::eq
2-parameter signature
t::eq(actual, expected)
Tests equality of the actual and expected values.
- Parameters
actualAnyActual value.expectedAnyExpected value.
- Returns
NoneNo value is produced when the configured assertion succeeds.
3-parameter signature
t::eq(actual, expected, message)
Tests equality of the actual and expected values.
- Parameters
actualAnyActual value.expectedAnyExpected value.messageStringMessage to display on error.
- Returns
NoneNo value is produced when the configured assertion succeeds.
t::fail
0-parameter signature
t::fail()
fail returns an error.
- Parameters
- None
- Returns
NoneNo success value is produced because this assertion always fails.
1-parameter signature
t::fail(message)
fail returns an error.
- Parameters
messageStringMessage to display on error.
- Returns
NoneNo success value is produced because this assertion always fails.
t::false
1-parameter signature
t::false(actual)
Tests whether the value is false.
- Parameters
actualAnyValue to test.
- Returns
NoneNo value is produced when the configured assertion succeeds.
2-parameter signature
t::false(actual, message)
Tests whether the value is false.
- Parameters
actualAnyValue to test.messageStringMessage to display on error.
- Returns
NoneNo value is produced when the configured assertion succeeds.
t::float
1-parameter signature
t::float(actual)
Tests whether the value has the Float type.
- Parameters
actualAnyValue to test.
- Returns
NoneNo value is produced when the configured assertion succeeds.
2-parameter signature
t::float(actual, message)
Tests whether the value has the Float type.
- Parameters
actualAnyValue to test.messageStringMessage to display on error.
- Returns
NoneNo value is produced when the configured assertion succeeds.
t::gt
2-parameter signature
t::gt(actual, expected)
Tests whether the actual value is greater than the expected value.
- Parameters
actualAnyActual value.expectedAnyExpected value.
- Returns
NoneNo value is produced when the configured assertion succeeds.
3-parameter signature
t::gt(actual, expected, message)
Tests whether the actual value is greater than the expected value.
- Parameters
actualAnyActual value.expectedAnyExpected value.messageStringMessage to display on error.
- Returns
NoneNo value is produced when the configured assertion succeeds.
t::gte
2-parameter signature
t::gte(actual, expected)
Tests whether the actual value is greater than or equal to the expected value.
- Parameters
actualAnyActual value.expectedAnyExpected value.
- Returns
NoneNo value is produced when the configured assertion succeeds.
3-parameter signature
t::gte(actual, expected, message)
Tests whether the actual value is greater than or equal to the expected value.
- Parameters
actualAnyActual value.expectedAnyExpected value.messageStringMessage to display on error.
- Returns
NoneNo value is produced when the configured assertion succeeds.
t::has
2-parameter signature
t::has(object, keys)
Tests whether a map has one property or all properties in a list.
- Parameters
objectMapObject or map to inspect.keysString | [String]Property name or property names to require.
- Returns
NoneNo value is produced when the configured assertion succeeds.
3-parameter signature
t::has(object, keys, message)
Tests whether a map has one property or all properties in a list.
- Parameters
objectMapObject or map to inspect.keysString | [String]Property name or property names to require.messageStringMessage to display on error.
- Returns
NoneNo value is produced when the configured assertion succeeds.
t::int
1-parameter signature
t::int(actual)
Tests whether the value has the Int type.
- Parameters
actualAnyActual value.
- Returns
NoneNo value is produced when the configured assertion succeeds.
2-parameter signature
t::int(actual, message)
Tests whether the value has the Int type.
- Parameters
actualAnyActual value.messageStringMessage to display on error.
- Returns
NoneNo value is produced when the configured assertion succeeds.
t::len
2-parameter signature
t::len(actual, length)
Tests whether a measurable value has the expected length or size.
- Parameters
actualMeasurableMeasurable value.lengthIntTarget length.
- Returns
NoneNo value is produced when the configured assertion succeeds.
3-parameter signature
t::len(actual, length, message)
Tests whether a measurable value has the expected length or size.
- Parameters
actualMeasurableMeasurable value.lengthIntTarget length.messageStringMessage to display on error.
- Returns
NoneNo value is produced when the configured assertion succeeds.
t::lt
2-parameter signature
t::lt(actual, expected)
Tests whether the actual value is less than the expected value.
- Parameters
actualAnyActual value.expectedAnyExpected value.
- Returns
NoneNo value is produced when the configured assertion succeeds.
3-parameter signature
t::lt(actual, expected, message)
Tests whether the actual value is less than the expected value.
- Parameters
actualAnyActual value.expectedAnyExpected value.messageStringMessage to display on error.
- Returns
NoneNo value is produced when the configured assertion succeeds.
t::lte
2-parameter signature
t::lte(actual, expected)
Tests whether the actual value is less than or equal to the expected value.
- Parameters
actualAnyActual value.expectedAnyExpected value.
- Returns
NoneNo value is produced when the configured assertion succeeds.
3-parameter signature
t::lte(actual, expected, message)
Tests whether the actual value is less than or equal to the expected value.
- Parameters
actualAnyActual value.expectedAnyExpected value.messageStringMessage to display on error.
- Returns
NoneNo value is produced when the configured assertion succeeds.
t::match
2-parameter signature
t::match(actual, expression)
Tests whether the value matches the regular expression.
- Parameters
actualAnyActual value.expressionStringRegular expression.
- Returns
NoneNo value is produced when the configured assertion succeeds.
3-parameter signature
t::match(actual, expression, message)
Tests whether the value matches the regular expression.
- Parameters
actualAnyActual value.expressionStringRegular expression.messageStringMessage to display on error.
- Returns
NoneNo value is produced when the configured assertion succeeds.
t::none
1-parameter signature
t::none(actual)
Tests whether the value is None.
- Parameters
actualAnyValue to test.
- Returns
NoneNo value is produced when the configured assertion succeeds.
2-parameter signature
t::none(actual, message)
Tests whether the value is None.
- Parameters
actualAnyValue to test.messageStringMessage to display on error.
- Returns
NoneNo value is produced when the configured assertion succeeds.
t::number
1-parameter signature
t::number(actual)
Tests whether the value belongs to the numeric family.
- Parameters
actualAnyValue to test.
- Returns
NoneNo value is produced when the configured assertion succeeds.
2-parameter signature
t::number(actual, message)
Tests whether the value belongs to the numeric family.
- Parameters
actualAnyValue to test.messageStringMessage to display on error.
- Returns
NoneNo value is produced when the configured assertion succeeds.
t::object
1-parameter signature
t::object(actual)
Tests whether the value has the Object type.
- Parameters
actualAnyValue to test.
- Returns
NoneNo value is produced when the configured assertion succeeds.
2-parameter signature
t::object(actual, message)
Tests whether the value has the Object type.
- Parameters
actualAnyValue to test.messageStringMessage to display on error.
- Returns
NoneNo value is produced when the configured assertion succeeds.
t::string
1-parameter signature
t::string(actual)
Tests whether the value has the String type.
- Parameters
actualAnyValue to test.
- Returns
NoneNo value is produced when the configured assertion succeeds.
2-parameter signature
t::string(actual, message)
Tests whether the value has the String type.
- Parameters
actualAnyValue to test.messageStringMessage to display on error.
- Returns
NoneNo value is produced when the configured assertion succeeds.
t::true
1-parameter signature
t::true(actual)
Tests whether the value is true.
- Parameters
actualAnyValue to test.
- Returns
NoneNo value is produced when the configured assertion succeeds.
2-parameter signature
t::true(actual, message)
Tests whether the value is true.
- Parameters
actualAnyValue to test.messageStringMessage to display on error.
- Returns
NoneNo value is produced when the configured assertion succeeds.
t::not::approx
3-parameter signature
t::not::approx(actual, expected, tolerance)
Tests whether two numeric values are within an inclusive tolerance.
- Parameters
actualInt | FloatActual numeric value.expectedInt | FloatExpected numeric value.toleranceInt | FloatMaximum non-negative difference.
- Returns
NoneNo value is produced when the configured assertion succeeds.
4-parameter signature
t::not::approx(actual, expected, tolerance, message)
Tests whether two numeric values are within an inclusive tolerance.
- Parameters
actualInt | FloatActual numeric value.expectedInt | FloatExpected numeric value.toleranceInt | FloatMaximum non-negative difference.messageStringMessage to display on error.
- Returns
NoneNo value is produced when the configured assertion succeeds.
t::not::array
1-parameter signature
t::not::array(actual)
Tests whether the value has the array type.
- Parameters
actualAnyValue to test.
- Returns
NoneNo value is produced when the configured assertion succeeds.
2-parameter signature
t::not::array(actual, message)
Tests whether the value has the array type.
- Parameters
actualAnyValue to test.messageStringMessage to display on error.
- Returns
NoneNo value is produced when the configured assertion succeeds.
t::not::between
3-parameter signature
t::not::between(value, min, max)
Tests whether a value is within inclusive minimum and maximum boundaries.
- Parameters
valueAnyValue to test.minAnyInclusive minimum boundary.maxAnyInclusive maximum boundary.
- Returns
NoneNo value is produced when the configured assertion succeeds.
4-parameter signature
t::not::between(value, min, max, message)
Tests whether a value is within inclusive minimum and maximum boundaries.
- Parameters
valueAnyValue to test.minAnyInclusive minimum boundary.maxAnyInclusive maximum boundary.messageStringMessage to display on error.
- Returns
NoneNo value is produced when the configured assertion succeeds.
t::not::binary
1-parameter signature
t::not::binary(actual)
Tests whether the value has the binary type.
- Parameters
actualAnyValue to test.
- Returns
NoneNo value is produced when the configured assertion succeeds.
2-parameter signature
t::not::binary(actual, message)
Tests whether the value has the binary type.
- Parameters
actualAnyValue to test.messageStringMessage to display on error.
- Returns
NoneNo value is produced when the configured assertion succeeds.
t::not::bool
1-parameter signature
t::not::bool(actual)
Tests whether the value has the Boolean type.
- Parameters
actualAnyValue to test.
- Returns
NoneNo value is produced when the configured assertion succeeds.
2-parameter signature
t::not::bool(actual, message)
Tests whether the value has the Boolean type.
- Parameters
actualAnyValue to test.messageStringMessage to display on error.
- Returns
NoneNo value is produced when the configured assertion succeeds.
t::not::contains
2-parameter signature
t::not::contains(actual, expected)
Tests whether the actual container contains the expected value.
- Parameters
actualString | Array | Object | IterableHaystack value.expectedAnyExpected value.
- Returns
NoneNo value is produced when the configured assertion succeeds.
3-parameter signature
t::not::contains(actual, expected, message)
Tests whether the actual container contains the expected value.
- Parameters
actualString | Array | Object | IterableHaystack value.expectedAnyExpected value.messageStringMessage to display on error.
- Returns
NoneNo value is produced when the configured assertion succeeds.
t::not::datetime
1-parameter signature
t::not::datetime(actual)
Tests whether the value has the DateTime type.
- Parameters
actualAnyValue to test.
- Returns
NoneNo value is produced when the configured assertion succeeds.
2-parameter signature
t::not::datetime(actual, message)
Tests whether the value has the DateTime type.
- Parameters
actualAnyValue to test.messageStringMessage to display on error.
- Returns
NoneNo value is produced when the configured assertion succeeds.
t::not::duration
1-parameter signature
t::not::duration(actual)
Tests whether the value has the Duration type.
- Parameters
actualAnyValue to test.
- Returns
NoneNo value is produced when the configured assertion succeeds.
2-parameter signature
t::not::duration(actual, message)
Tests whether the value has the Duration type.
- Parameters
actualAnyValue to test.messageStringMessage to display on error.
- Returns
NoneNo value is produced when the configured assertion succeeds.
t::not::empty
1-parameter signature
t::not::empty(actual)
Tests whether the target is empty.
- Parameters
actualMeasurable | Binary | Object | Any[] | StringValue to test.
- Returns
NoneNo value is produced when the configured assertion succeeds.
2-parameter signature
t::not::empty(actual, message)
Tests whether the target is empty.
- Parameters
actualMeasurable | Binary | Object | Any[] | StringValue to test.messageStringMessage to display on error.
- Returns
NoneNo value is produced when the configured assertion succeeds.
t::not::eq
2-parameter signature
t::not::eq(actual, expected)
Tests equality of the actual and expected values.
- Parameters
actualAnyActual value.expectedAnyExpected value.
- Returns
NoneNo value is produced when the configured assertion succeeds.
3-parameter signature
t::not::eq(actual, expected, message)
Tests equality of the actual and expected values.
- Parameters
actualAnyActual value.expectedAnyExpected value.messageStringMessage to display on error.
- Returns
NoneNo value is produced when the configured assertion succeeds.
t::not::false
1-parameter signature
t::not::false(actual)
Tests whether the value is false.
- Parameters
actualAnyValue to test.
- Returns
NoneNo value is produced when the configured assertion succeeds.
2-parameter signature
t::not::false(actual, message)
Tests whether the value is false.
- Parameters
actualAnyValue to test.messageStringMessage to display on error.
- Returns
NoneNo value is produced when the configured assertion succeeds.
t::not::float
1-parameter signature
t::not::float(actual)
Tests whether the value has the Float type.
- Parameters
actualAnyValue to test.
- Returns
NoneNo value is produced when the configured assertion succeeds.
2-parameter signature
t::not::float(actual, message)
Tests whether the value has the Float type.
- Parameters
actualAnyValue to test.messageStringMessage to display on error.
- Returns
NoneNo value is produced when the configured assertion succeeds.
t::not::gt
2-parameter signature
t::not::gt(actual, expected)
Tests whether the actual value is greater than the expected value.
- Parameters
actualAnyActual value.expectedAnyExpected value.
- Returns
NoneNo value is produced when the configured assertion succeeds.
3-parameter signature
t::not::gt(actual, expected, message)
Tests whether the actual value is greater than the expected value.
- Parameters
actualAnyActual value.expectedAnyExpected value.messageStringMessage to display on error.
- Returns
NoneNo value is produced when the configured assertion succeeds.
t::not::gte
2-parameter signature
t::not::gte(actual, expected)
Tests whether the actual value is greater than or equal to the expected value.
- Parameters
actualAnyActual value.expectedAnyExpected value.
- Returns
NoneNo value is produced when the configured assertion succeeds.
3-parameter signature
t::not::gte(actual, expected, message)
Tests whether the actual value is greater than or equal to the expected value.
- Parameters
actualAnyActual value.expectedAnyExpected value.messageStringMessage to display on error.
- Returns
NoneNo value is produced when the configured assertion succeeds.
t::not::has
2-parameter signature
t::not::has(object, keys)
Tests whether a map has one property or all properties in a list.
- Parameters
objectMapObject or map to inspect.keysString | [String]Property name or property names to require.
- Returns
NoneNo value is produced when the configured assertion succeeds.
3-parameter signature
t::not::has(object, keys, message)
Tests whether a map has one property or all properties in a list.
- Parameters
objectMapObject or map to inspect.keysString | [String]Property name or property names to require.messageStringMessage to display on error.
- Returns
NoneNo value is produced when the configured assertion succeeds.
t::not::int
1-parameter signature
t::not::int(actual)
Tests whether the value has the Int type.
- Parameters
actualAnyActual value.
- Returns
NoneNo value is produced when the configured assertion succeeds.
2-parameter signature
t::not::int(actual, message)
Tests whether the value has the Int type.
- Parameters
actualAnyActual value.messageStringMessage to display on error.
- Returns
NoneNo value is produced when the configured assertion succeeds.
t::not::len
2-parameter signature
t::not::len(actual, length)
Tests whether a measurable value has the expected length or size.
- Parameters
actualMeasurableMeasurable value.lengthIntTarget length.
- Returns
NoneNo value is produced when the configured assertion succeeds.
3-parameter signature
t::not::len(actual, length, message)
Tests whether a measurable value has the expected length or size.
- Parameters
actualMeasurableMeasurable value.lengthIntTarget length.messageStringMessage to display on error.
- Returns
NoneNo value is produced when the configured assertion succeeds.
t::not::lt
2-parameter signature
t::not::lt(actual, expected)
Tests whether the actual value is less than the expected value.
- Parameters
actualAnyActual value.expectedAnyExpected value.
- Returns
NoneNo value is produced when the configured assertion succeeds.
3-parameter signature
t::not::lt(actual, expected, message)
Tests whether the actual value is less than the expected value.
- Parameters
actualAnyActual value.expectedAnyExpected value.messageStringMessage to display on error.
- Returns
NoneNo value is produced when the configured assertion succeeds.
t::not::lte
2-parameter signature
t::not::lte(actual, expected)
Tests whether the actual value is less than or equal to the expected value.
- Parameters
actualAnyActual value.expectedAnyExpected value.
- Returns
NoneNo value is produced when the configured assertion succeeds.
3-parameter signature
t::not::lte(actual, expected, message)
Tests whether the actual value is less than or equal to the expected value.
- Parameters
actualAnyActual value.expectedAnyExpected value.messageStringMessage to display on error.
- Returns
NoneNo value is produced when the configured assertion succeeds.
t::not::match
2-parameter signature
t::not::match(actual, expression)
Tests whether the value matches the regular expression.
- Parameters
actualAnyActual value.expressionStringRegular expression.
- Returns
NoneNo value is produced when the configured assertion succeeds.
3-parameter signature
t::not::match(actual, expression, message)
Tests whether the value matches the regular expression.
- Parameters
actualAnyActual value.expressionStringRegular expression.messageStringMessage to display on error.
- Returns
NoneNo value is produced when the configured assertion succeeds.
t::not::none
1-parameter signature
t::not::none(actual)
Tests whether the value is None.
- Parameters
actualAnyValue to test.
- Returns
NoneNo value is produced when the configured assertion succeeds.
2-parameter signature
t::not::none(actual, message)
Tests whether the value is None.
- Parameters
actualAnyValue to test.messageStringMessage to display on error.
- Returns
NoneNo value is produced when the configured assertion succeeds.
t::not::number
1-parameter signature
t::not::number(actual)
Tests whether the value belongs to the numeric family.
- Parameters
actualAnyValue to test.
- Returns
NoneNo value is produced when the configured assertion succeeds.
2-parameter signature
t::not::number(actual, message)
Tests whether the value belongs to the numeric family.
- Parameters
actualAnyValue to test.messageStringMessage to display on error.
- Returns
NoneNo value is produced when the configured assertion succeeds.
t::not::object
1-parameter signature
t::not::object(actual)
Tests whether the value has the Object type.
- Parameters
actualAnyValue to test.
- Returns
NoneNo value is produced when the configured assertion succeeds.
2-parameter signature
t::not::object(actual, message)
Tests whether the value has the Object type.
- Parameters
actualAnyValue to test.messageStringMessage to display on error.
- Returns
NoneNo value is produced when the configured assertion succeeds.
t::not::string
1-parameter signature
t::not::string(actual)
Tests whether the value has the String type.
- Parameters
actualAnyValue to test.
- Returns
NoneNo value is produced when the configured assertion succeeds.
2-parameter signature
t::not::string(actual, message)
Tests whether the value has the String type.
- Parameters
actualAnyValue to test.messageStringMessage to display on error.
- Returns
NoneNo value is produced when the configured assertion succeeds.
t::not::true
1-parameter signature
t::not::true(actual)
Tests whether the value is true.
- Parameters
actualAnyValue to test.
- Returns
NoneNo value is produced when the configured assertion succeeds.
2-parameter signature
t::not::true(actual, message)
Tests whether the value is true.
- Parameters
actualAnyValue to test.messageStringMessage to display on error.
- Returns
NoneNo value is produced when the configured assertion succeeds.