UnexpectedOutputError
Create an Error with a formatted message that compares actual/expected values. This error is not thrown by spooning, it is provided as a convenience for test implementations. Using it is entirely optional.
Properties
-
actual
any —unchanged
actual
value passed to constructor -
expected
any —unchanged
expected
value passed to constructor
new UnexpectedOutputError(actual, expected, prefix)
Creates a new UnexpectedOutputError
object and sets the this.actual
and this.expected
properties.
-
actual
any —actual value
-
expected
any —expected value
-
prefix
string —added to the start of the returned message
(default:'Unexpected output\n'
)
See
-
acEx
—
used by the constructor to generate the error message
Examples
Show Error Message
Output
Unexpected output
<<<<<<< actual
A
=======
B
>>>>>>> expected