Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Go to Latest
class VerificationError
extends RhumError
import { VerificationError } from "https://deno.land/x/rhum@v2.1.0-rc.1/src/errors.ts";

Error to throw in relation to verification logic. For example, when a method or function expression is being verified that it was called once via .verify("someMethod").toBeCalled(1). The stack trace shown with this error is modified to look like the following example:

Examples

Example 1

VerificationError: Method "someMethod" was called with args when expected to receive no args.
    at file:///path/to/some/file.ts:99:14

Verification Results:
    Actual args   -> (2, "hello", {})
    Expected args -> (no args)

Check the above "file.ts" file at/around line 99 for code like the following to fix this error:
    .verify("someMethod").toBeCalledWithoutArgs()

Constructors

new
VerificationError(
message: string,
codeThatThrew: string,
actualResults: string,
expectedResults: string,
)