Readonly_Tracks the internal stack of functions that have been called during the evaluation of the context
Creates a new child IScopeContext object using the provided value and optional overrides
The value to use for the new context
Optionaloverrides: IScopeContextOverridesThe optional overrides for the context
ReadonlyoptsReturns the options for the current context.
ReadonlyorgReturns the original arguments used during the initiation of the proxied request this is used to enable re-evaluation of the original request if needed.
ReadonlyvalueReturns the initial value being evaluated
This evaluates the result and if it fails, it throws an error
The expression to evaluate
OptionalevalMsg: MsgSourceThe default message to display
OptionalcausedBy: ErrorThrows an AssertionFailure exception with the given message and optional
details which are obtained via the getDetails function.
The message to display.
Optionaldetails: anyThe details (props) to include in the error
OptionalstackStart: Function | Function[]The optional stack start function
AssertionFailure always
Returns a named value associated with the context, this is a recursive operation
and will return the first value found in the current context and all parent contexts
as defined by calling the set function.
The name of the property
Returns the details of the evaluation
Resolves and returns only the eval message to be displayed for the evaluation,
this does not include the value or the scope initMsg or any other details.
Used when no-message is provided
OptionalskipOverrides: booleanWhen true, the eval message is resolved directly and does not include the other details obtained from the execution chain like the negation.
Returns the message to be displayed for the evaluation which includes
the scope initMsg prefixed with the evalMsg if provided and the value
OptionalevalMsg: MsgSourceUsed when no-message is provided
OptionalskipOverrides: booleanWhen true, the eval message is resolved directly and does not include the other details obtained from the execution chain like the negation.
Returns all of the keys of the values from both the current and parent
context(s), this is a recursive operation and will return all keys from
the current context and all parent contexts as defined by calling the set
function.
Sets a named value associated for the context, this only affected the
current context and does not affect the parent context. If the value
already exists in the parent context, it will be overridden by the new value
for any calls to get that are made on the current context. All calls to get
for the parent context will return the original value.
The name of the property
The value to set
Sets the current operation name and adds it to the context execution order, which is used to display the order of operations in the error message if an assertion fails.
The current operation name
The current context
The scope context is used to track the evaluation of the assertion and provide the necessary information to the assertion functions to enable the evaluation of the assertion and the display of the results.
Since
0.1.0