Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated expect-failure docs #1058

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion docs/en/pact-functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -2004,10 +2004,11 @@ pact> (expect "Sanity prevails." 4 (+ 2 2))


Evaluate EXP and succeed only if it throws an error.
When err is provided, it will succeed if err is contained within the thrown error.
```lisp
pact> (expect-failure "Enforce fails on false" (enforce false "Expected error"))
"Expect failure: success: Enforce fails on false"
pact> (expect-failure "Enforce fails with message" "Expected error" (enforce false "Expected error"))
pact> (expect-failure "Enforce fails with message" "Expected error" (enforce false "Behold, an Expected error!"))
"Expect failure: success: Enforce fails with message"
```

Expand Down