Assertive.ts - Core API
Assertive.ts - Core API
Table of contents
References
Classes
Interfaces
Type Aliases
Variables
Functions
References
assert
Renames and re-exports expect
assertThat
Renames and re-exports expect
Type Aliases
AssertionFactory
Ƭ AssertionFactory<S
, A
>: (actual
: S
) => A
Type parameters
Name | Type |
---|---|
S |
S |
A |
extends Assertion <S > |
Type declaration
• (actual
): A
Parameters
Name | Type |
---|---|
actual |
S |
Returns
A
Defined in
packages/core/src/lib/helpers/TypeFactories.ts:13
Variables
AssertionError
• AssertionError: typeof AssertionError
Defined in
node_modules/@types/node/assert.d.ts:17
TypeFactories
• Const
TypeFactories: Readonly
<StaticTypeFactories
>
Defined in
packages/core/src/lib/helpers/TypeFactories.ts:106
Functions
expect
▸ expect(actual
): BooleanAssertion
Parameters
Name | Type |
---|---|
actual |
boolean |
Returns
BooleanAssertion
Defined in
packages/core/src/lib/expect.ts:72
▸ expect(actual
): NumberAssertion
Parameters
Name | Type |
---|---|
actual |
number |
Returns
NumberAssertion
Defined in
packages/core/src/lib/expect.ts:72
▸ expect(actual
): StringAssertion
Parameters
Name | Type |
---|---|
actual |
string |
Returns
StringAssertion
Defined in
packages/core/src/lib/expect.ts:72
▸ expect(actual
): DateAssertion
Parameters
Name | Type |
---|---|
actual |
Date |
Returns
DateAssertion
Defined in
packages/core/src/lib/expect.ts:72
▸ expect<T
>(actual
): ArrayAssertion
<T
>
Type parameters
Name |
---|
T |
Parameters
Name | Type |
---|---|
actual |
T [] |
Returns
ArrayAssertion
<T
>
Defined in
packages/core/src/lib/expect.ts:72
▸ expect<T
>(actual
): PromiseAssertion
<T
, false
>
Type parameters
Name |
---|
T |
Parameters
Name | Type |
---|---|
actual |
Promise <T > |
Returns
PromiseAssertion
<T
, false
>
Defined in
packages/core/src/lib/expect.ts:72
▸ expect<T
>(actual
): FunctionAssertion
<T
>
Type parameters
Name | Type |
---|---|
T |
extends AnyFunction |
Parameters
Name | Type |
---|---|
actual |
T |
Returns
FunctionAssertion
<T
>
Defined in
packages/core/src/lib/expect.ts:72
▸ expect<T
>(actual
): ErrorAssertion
<T
>
Type parameters
Name | Type |
---|---|
T |
extends Error |
Parameters
Name | Type |
---|---|
actual |
T |
Returns
ErrorAssertion
<T
>
Defined in
packages/core/src/lib/expect.ts:72
▸ expect<T
>(actual
): ObjectAssertion
<T
>
Type parameters
Name | Type |
---|---|
T |
extends Struct |
Parameters
Name | Type |
---|---|
actual |
T |
Returns
ObjectAssertion
<T
>
Defined in
packages/core/src/lib/expect.ts:72
▸ expect<T
>(actual
): Assertion
<T
>
Type parameters
Name |
---|
T |
Parameters
Name | Type |
---|---|
actual |
T |
Returns
Assertion
<T
>
Defined in
packages/core/src/lib/expect.ts:72
usePlugin
▸ usePlugin<P
>(plugins
): void
Extends @assertive-ts/core
with local or 3rd-party plugin(s).
Type parameters
Name | Type |
---|---|
P |
extends Plugin <any , Assertion <any >> |
Parameters
Name | Type | Description |
---|---|---|
plugins |
P | P [] |
a plugin or an array of plugins to use |
Returns
void
See