Assertive.ts - Core API / Plugin
Interface: Plugin<T, A>
A plugin object that can be used to extend the expect(..)
function.
Type parameters
Name | Type | Description |
---|---|---|
T |
T |
the type the plugin is meant for |
A |
extends Assertion <T > |
the type of the assertion for T |
Table of contents
Properties
Properties
Assertion
• Assertion: (actual
: T
) => A
The assertion A
constructor the plugin adds
Type declaration
• new Assertion(actual
): A
The assertion A
constructor the plugin adds
Parameters
Name | Type |
---|---|
actual |
T |
Returns
A
Defined in
packages/core/src/lib/config/Config.ts:13
insertAt
• insertAt: "top"
| "bottom"
The position were the predicate will test to return the Assertion
or not:
top
: Test before all primitives and object-related types.bottom
: Test after all primitives and object-related types.
Defined in
packages/core/src/lib/config/Config.ts:19
predicate
• predicate: (actual
: unknown
) => actual is T
The predicate that tests if the actual value should returnt and instance of
the plugin’s Assertion
.
Type declaration
▸ (actual
): actual is T
The predicate that tests if the actual value should returnt and instance of
the plugin’s Assertion
.
Parameters
Name | Type |
---|---|
actual |
unknown |
Returns
actual is T