Placeholder interface
Utility interface for specifying dynamic variables in expect error messages.
Signature:
interface Placeholder
Remarks
At build time, the variables placed via this interface will be populated with their respective values.
This allows you to define a static string, while still specifying the location of certain variables—without needing to know their values.
Example
new ExpectMessageBuilder(
`Expected ${place.name} to ${place.not} equal ${place.expected.value}`
);
Properties
Property | Modifiers | Type | Description |
---|---|---|---|
The "actual" variable in an expect() statement. | |||
The "expected" variable in an expect() statement. | |||
string | A placeholder for array indices. | ||
string | A utility placeholder for either the path, or the actual value. Messages can configure their own names as well. | ||
string | A placeholder for the word | ||
string | A placeholder for the word | ||
string | A utility placeholder the path on nested variables. | ||
string | A utility placeholder for describing why the check failed. | ||
string | A placeholder for the word |